enable and disable submenu items
mkoob at rogers.com
Thu Jan 22 11:38:07 CST 2009
I have added submenus to an item in the File menu using menubuilder
New Project file
Open Project file
Save Project file
Close Project file
Using menu builder I can enable and disable the submenus of 'New Project
file' and it functions correctly with the 'New Project file' item
enabled at all times and the submenus enabled or disabled.
However when I try to enable or the disable the submenus using scripts
with the command
enable menuitem 3 of menu "file"
It doesn't work or I get odd results such as the disabled item appears
under the 'New Project File' menu indented slightly and not in the
cascading menu. This command does not work for the three submenu items
I thought I should refer to the submenus in the same way as the other
menu items by their position in the menu ie. 'from source is 2, 'from
target' is 3, and 'from existing' is 4. Is this correct or do I have to
somehow refer to them differently.
The other menuitems work when I use their postions ie. open is 5, save
is 6 and close is 7.
I know that when using menupick for submenus the parameter given is the
menu item name and the submenu name separated by a |. Is there
something similar that has to be done when enabling or disabling a
Thanks for any help.
More information about the use-livecode