Resetting a combo box?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Resetting a combo box?

Post by shawnblc »

I tried the following without success:

Code: Select all

put empty into button "btnAge"

Code: Select all

put menuItem "20" into button "btnAge"
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Resetting a combo box?

Post by Klaus »

Hi Shawn,

maybe you mean:
...
set the label of btn "btnAge" to empty
...
Or maybe:
...
set the label of btn "btnAge" to "Your default value here..."
...
?


Best

Klaus
shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Resetting a combo box?

Post by shawnblc »

Thanks Klaus. I was just actually coming back here to update and you posted.

I found another thread where you answered this and it helped. Thanks for being there!
http://forums.livecode.com/viewtopic.ph ... box#p92041
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Resetting a combo box?

Post by dunbarx »

Hi.

I did not read the thread where Klaus saved the day. Does it say anything about the fact that a button is a container? The name is what the button will show if the label is empty, but the label is what the button will show even if the name is not empty.

But the contents of the button are another property altogether. This is what you did above. Sort of an invisible, er, container, within a control. Anyway, you can put an entire speech into a button, and get it back, and this has nothing to do with either the name or the label:

put "theGettysburgAddress" into btn "yourButton"
answer line 1 to 5 of btn "yourButton"

Craig Newman
shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Resetting a combo box?

Post by shawnblc »

dunbarx wrote:Hi.

I did not read the thread where Klaus saved the day. Does it say anything about the fact that a button is a container? The name is what the button will show if the label is empty, but the label is what the button will show even if the name is not empty.

But the contents of the button are another property altogether. This is what you did above. Sort of an invisible, er, container, within a control. Anyway, you can put an entire speech into a button, and get it back, and this has nothing to do with either the name or the label:

put "theGettysburgAddress" into btn "yourButton"
answer line 1 to 5 of btn "yourButton"

Craig Newman
Craig, I appreciate that! Very good information to know for a new, but eager LC 'programmer'!

I might be old compared to a lot of you, but this old mind keeps on a moving!
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Resetting a combo box?

Post by dunbarx »

Old? Hmph.

Do you remember "Modern Farmer"?

Craig.
Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Resetting a combo box?

Post by Simon »

H Craig,
The Professor thought the island was sinking. What caused it? :)
Archie and Meathead were having an argument. The question came up "What do you do if there's an earthquake?" What were they arguing about? :)

Long story behind those two questions.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Resetting a combo box?

Post by dunbarx »

Simon.

Late 60's and 70's sitcoms? Pulleease...

I am talking early 50's. Modern Farmer came on just before Farmer Brown cartoons. The "farmer" is utterly coincidental.

Craig
magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: Resetting a combo box?

Post by magice »

Simon wrote:H Craig,
The Professor thought the island was sinking. What caused it? :)
Archie and Meathead were having an argument. The question came up "What do you do if there's an earthquake?" What were they arguing about? :)

Long story behind those two questions.

Simon
OK if Craig isn't going to answer them....
1. Gilligan was moving his stick.
2. Whether to put on both socks then both shoes or one sock then one shoe.
Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Resetting a combo box?

Post by Simon »

WOW S**T!!! :D :D :D
magice, dead on!

I'm going to have to follow your postings like a stalker now!

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: Resetting a combo box?

Post by magice »

Simon wrote:WOW S**T!!! :D :D :D
magice, dead on!

I'm going to have to follow your postings like a stalker now!

Simon
Stalk away....Just be sure to solve all my problems while you are at it. :D
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Resetting a combo box?

Post by Klaus »

Ah, TV-junkies, love it! Hi friends! :D
Post Reply