Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / BUG: GuiSetMenuOpts()

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. 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"
Message2. Re: problem with GuiSetMenuOpts()
#8472
Posted by: Jeff Glatt 2006-08-17 14:22:05
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.
Message3. Re: problem with GuiSetMenuOpts()
#8473
Posted by: cliff boley 2006-08-18 00:36:21
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 First 1 Last
掌柜推荐
 
 
¥908.00 ·
 
 
¥1,380.00 ·
 
 
¥1,580.00 ·
 
 
¥890.00 ·
 
 
¥1,800.00 ·
 
 
¥294.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0