 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Landvermesser
Joined: 03 Nov 2004 Posts: 51
|
Posted: Sun Mar 06, 2005 3:12 pm Post subject: DeleteAll in Gui Submenus |
|
|
DeleteAll does not work and all following lines do not work too:
| Code: |
Menu, Submenu, Add, Testitem, Label
Menu, DropDownMenu, Add, TestSubmenu, :Submenu
Menu, MainMenu, Add, File, :DropDownMenu
Gui, Menu, MainMenu
Gui, Show, Center w200 h100, Test
Menu, Submenu, DeleteAll
Menu, Submenu, Add, NewTestItem, Label
Label:
Return
|
Is it a bug? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Sun Mar 06, 2005 11:39 pm Post subject: |
|
|
Short answer: To solve this issue, detach the menu bar with "Gui Menu" prior to doing DeleteAll, then reattach it afterward with "Gui Menu, MainMenu".
Long answer:
There were two problems with the program:
1) No error message was displayed to indicate the failure of DeleteAll.
2) The documentation was wrong because it says you can use DeleteAll on a menu bar's submenus, which isn't always the case.
Both of these problems will be fixed in the next update, so thanks for reporting it. The updated documentation is: | Quote: | | The use of certain destructive menu sub-commands such as Delete and DeleteAll against a menu that is currently being used as a menu bar (and in some cases, its submenus) is not supported and will cause an error dialog to be displayed (unless the UseErrorLevel setting is in effect). Use the following steps to make such changes: 1) detach the menu bar with "Gui Menu"; 2) make the changes; 3) reattach the menu bar with "Gui Menu, MyMenuBar". |
|
|
| Back to top |
|
 |
Landvermesser
Joined: 03 Nov 2004 Posts: 51
|
Posted: Mon Mar 07, 2005 8:21 am Post subject: |
|
|
| Thanks, Chris! |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|