Option Menu Question

Mark Schonewille m.schonewille at economy-x-talk.com
Thu Dec 22 19:54:10 EST 2011


Hey, that works! Nice solution!

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Become our partner in sales http://qery.us/1bq Start selling Color Converter today. 20% commission!

On 23 dec 2011, at 01:37, Pete wrote:

> I think I have found a way to do this without using multiple controls.
> 
> I have a preOpenCard handler like this:
> 
> on preOpenCard
>   set the text of button "myMenu" to "Select an option..."
>   set the textColor of myMenu to "#666666" --makes the text grey
> end preOpenCard
> 
> I put the following mouseDown handler into the option menu script.
> 
> *on* mouseDown
> 
>   *set* the text of me to the textOptions of me
> 
>   *set* the textColor of me to black
> 
> *end* mouseDown
> 
> 
> The textOption custom property contains the real options for the menu.
> I'll probably put the initial prompt text into a custom property too so
> it's more general purpose - will also make it easier to check if the user
> selected an option or not.
> 
> 
> That seems to work just fine but there may be some corner cases I haven't
> tested.





More information about the use-livecode mailing list