Should this still work in OI10, as it does not seem to be.
* the form designer does not support events for popup * menus (those menu items which have sub-menu items), so * use EVENTQUALIFIER to route events from the EDIT menu * to the window's OMNIEVENT Qualifier = 2: "*": @appid<1>: "*OMNIEVENT*": @window: "." .Menu.Edit->EventQualifier = QualifierIf not, how do i generate the OMNIEVENTevent for the menu popup. (The event is diabled in the menu designer, which I thought was bit strange if there was actually a workaround)
I am trying do trap the 'Edit' and enable/disable the cutcopy/paste based on the focus status and clipboard.
Barry,
You can use the form's DROPDOWNMENU event to handle this sort of thing. it fires whenever a menu is about to be displayed and allows you to alter the structure if you wish. This is how the IDE adds the MRU items to it's File menu for example.
It passes two arguments:
MenuID - contains the ID of the MENU item that is about to display it's popupMenuStructure - Structure to be displayed. You can alter this as you wish.It will run a quick event before displaying the dropdown so you can handle it in a commuter module. You can prevent a menu from showing by using Set_EventStatus( TRUE$) just like you would to prevent a form closing.
Barry,
You can use the form's DROPDOWNMENU event to handle this sort of thing. it fires whenever a menu is about to be displayed and allows you to alter the structure if you wish. This is how the IDE adds the MRU items to it's File menu for example.
It passes two arguments:
MenuID - contains the ID of the MENU item that is about to display it's popupMenuStructure - Structure to be displayed. You can alter this as you wish.It will run a quick event before displaying the dropdown so you can handle it in a commuter module. You can prevent a menu from showing by using Set_EventStatus( TRUE$) just like you would to prevent a form closing.
Thank you.
I assume this is still waiting to be documented in the help, or am I looking in the wrong place.
Waiting to be documented.
The reason for the difference is that the older version is basically a "hack" - it requires an event script and it has to be jammed in by overloading another event, which completely breaks the "normal" OI Form programming paradigm.
Waiting to be documented.
The reason for the difference is that the older version is basically a "hack" - it requires an event script and it has to be jammed in by overloading another event, which completely breaks the "normal" OI Form programming paradigm.
Great, it works well