Selecting Menu Item in Option Menu
Jan Schenkel
janschenkel at yahoo.com
Wed Jan 28 08:12:53 EST 2009
--- Steven Axtell <saxtell at neb.rr.com> wrote:
> What command is used to select a menu item in an
> option menu? I want to "initialize" the option menu
> to a particular menu item upon opening a stack. I
> appreciate any help.
>
> Thanks,
>
> Steven Axtell
>
You can either set the label or the menuHistory
property.
##
set the label of button "MyOptionMenu" to "Choice 1"
set the menuHistory of button "MyOptionMenu" to 1
##
When you set the label, no "menuPick" message is sent;
however, if you use the menuHistory, then your option
menu will receive a "menuPick" message.
If you want to use the menuHistory property, but avoid
the "menuPick" message, you can always wrap it in a
lock/unlock messages pair.
##
lock messages
set the menuHistory of button "MyOptionMenu" to 1
unlock messages
##
HTH,
Jan Schenkel.
Quartam Reports & PDF Library for Revolution
<http://www.quartam.com>
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
More information about the use-livecode
mailing list