T
Tina Li
Hello,
I have a menu, "Foo", and a cascade submenu under it, called "Bar", that has
a number of menu items. If I want to delete all of the menu items under
"Bar", but would like to keep "Bar" (i.e. an empty cascade menu with no
items), how do I know how many items there are?
I assume I should use
deletemenuitems("Bar", 0, ???)
It's the last parameter ("end") that I don't know what to put in. I tried to
access "Bar" via self.menuBar.component("Foo-menu_Bar"), or to get the END
index of "Bar" via self.menuBar.component("Foo")[1].index("end") (because
Bar is the second submenu under Foo. I know, hard-coding is bad) but they
don't work.
Thanks much for your help!!!
Tina
I have a menu, "Foo", and a cascade submenu under it, called "Bar", that has
a number of menu items. If I want to delete all of the menu items under
"Bar", but would like to keep "Bar" (i.e. an empty cascade menu with no
items), how do I know how many items there are?
I assume I should use
deletemenuitems("Bar", 0, ???)
It's the last parameter ("end") that I don't know what to put in. I tried to
access "Bar" via self.menuBar.component("Foo-menu_Bar"), or to get the END
index of "Bar" via self.menuBar.component("Foo")[1].index("end") (because
Bar is the second submenu under Foo. I know, hard-coding is bad) but they
don't work.
Thanks much for your help!!!
Tina