Menu Buttons

Bob Sneidar bobs at twft.com
Tue May 10 13:02:32 EDT 2011


If it's a menu that can change programmatically (like a list of departments for example) then get the text of the field, get the lineoffset of what you are looking for, then set the menuhistory to that. 

For extra credit, save the last pick in a property, then check to see if the user selected the same thing next time around, and bail if he did to avoid any unwanted processing. Setting the menuhistory WILL trigger menupick. That's where you do it all. Remember to pass menupick in your menupick handler if you don't bail! 

Bob


On May 9, 2011, at 7:05 PM, Mark Wieder wrote:

> David-
> 
> Monday, May 9, 2011, 2:18:41 PM, you wrote:
> 
>> I've tried things like:
> 
>> send menupick (line 3 of btn "Examples") to btn "Examples"
> 
>> and 
> 
>> send menupick aspirin to btn "Examples"
> 
> Try setting the menuHistory of the button
> 
> -- 
> -Mark Wieder
> mwieder at ahsoftware.net
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list