enable and disable submenu items
Martin Koob
mkoob at rogers.com
Thu Jan 22 12:38:07 EST 2009
I have added submenus to an item in the File menu using menubuilder
File
New Project file
from source...
from target...
from existing...
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
submenu?
Thanks for any help.
Martin
More information about the use-livecode
mailing list