Modifying Drop-Down Menus on the fly

Phil Davis revdev at pdslabs.net
Tue Feb 9 14:54:47 EST 2016


In the button script:

on mouseDown
     -- put your list of choices into the button
end mouseDown

on menuPick pPicked
     -- act on the selected option
end menuPick


That should work!

Phil Davis



On 2/9/16 11:44 AM, Francis Nugent Dixon wrote:
> Hi from Sunny Brittany (at least it was this morning !),
>
> After many years of using buttons in my stacks, I am
> discovering the joys of using “Pull Down” menus (and
> about time too !).
>
> I can change the script “cases” with the “set script” command,
> but I also want to know how to change the value of the menu options
> on the fly,  for example, if I have a menu option “Show Table”
> in my button, once I have shown the table, how can I modify
> the menu option to show “Hide Table”, assuming that I also
> set the case in the script to the new value, with new instructions.
>
> I thought that it was possible to modify any button/field options
> on the fly, but I can’t grab the syntax of this requirement.
>
> I also see that the number of case entries is defined in the button
> specs. Can I change this also, or do I just set a maximum value
>
> I know that Klaus has played with menus (seen on forums)
> Maybe he has an answer ?
>
> -Francis
> _______________________________________________
> 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
>

-- 
Phil Davis





More information about the use-livecode mailing list