| Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 | 1. BUG: GuiSetMenuOpts() #8471 Posted by: cliff boley 2006-08-17 07:17:09 Last edited by: Jeff Glatt 2007-06-18 16:36:10 (Total edited 1 time) | I'm trying to run; GuiSetMenuOpts('MyPasteItem', , 'Paste' || '07'X || 'CTRL V') and I'm getting the following error message;
"GUISETMENUOPTS" reported "Not a defined type of control" | 2. Re: problem with GuiSetMenuOpts() #8472 | Make sure that you actually have a menu item with an ID of "MyPasteItem". Also, you should be calling this from the same script that created the window containing the menu. | 3. Re: problem with GuiSetMenuOpts() #8473 | Jeff, The GuiSet.. works on a menu item created with the menu resource.
If I dynimicall create a menu item with a GuiAddMenu('MyPasteItem','ITEM', '1 1) and then run a GuiSetMunuOpts('MyPasteItem', , 'Paste') then I get the above error.
Here is my test code;
WM_CLICK_AddItems: GuiAddMenu("Heading", "HEADING",2) GuiAddMenu("MyPasteItem", "ITEM", "1 1") GuiSetMenuOpts('MyPasteItem', , 'Paste') RETURN
MyPasteItem: say 'MyPasteItem' return
One other thing, notice that I have specified the heading as postion 2 and the item as position 1. This will put the heading in position 1 on the menu bar and the item below it. Clicking the Item will execute MyPastItem:.
It a specify GuiAddMenu("Heading", "HEADING",1) the heading is placed in postion one and the Item below as expected but clicking on the item will not execute MyPasteItem. Odd. I can work around this but I really would like the be able to change the captions on the created items.
thanks, cliff:-) | Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 |
|
|