Page 1 of 1

Resetting a combo box?

Posted: Tue Jun 24, 2014 11:28 pm
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"

Re: Resetting a combo box?

Posted: Tue Jun 24, 2014 11:45 pm
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

Re: Resetting a combo box?

Posted: Tue Jun 24, 2014 11:51 pm
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

Re: Resetting a combo box?

Posted: Wed Jun 25, 2014 3:02 am
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

Re: Resetting a combo box?

Posted: Wed Jun 25, 2014 3:38 am
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!

Re: Resetting a combo box?

Posted: Wed Jun 25, 2014 6:17 am
by dunbarx
Old? Hmph.

Do you remember "Modern Farmer"?

Craig.

Re: Resetting a combo box?

Posted: Wed Jun 25, 2014 7:48 am
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

Re: Resetting a combo box?

Posted: Wed Jun 25, 2014 3:26 pm
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

Re: Resetting a combo box?

Posted: Wed Jun 25, 2014 3:32 pm
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.

Re: Resetting a combo box?

Posted: Wed Jun 25, 2014 4:17 pm
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

Re: Resetting a combo box?

Posted: Wed Jun 25, 2014 4:43 pm
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

Re: Resetting a combo box?

Posted: Wed Jun 25, 2014 5:18 pm
by Klaus
Ah, TV-junkies, love it! Hi friends! :D