Page History
...
Code Block |
---|
* Create a context menu on the GOTFOCUS event of the State control on the CUST_ENTRY form. * (The CUST_ENTRY form can be found in the Examples application.) declare function ContextMenu status = ContextMenu( CtrlEntId, "CREATEMENU" ) |
CREATE Event Example
Code Block |
---|
* Create ContextMenus for all controls on the CREATE event of a form. declare function ContextMenu ctrlmap = Get_Property( CtrlEntId, "CTRLMAP" ) ctrlPos = 0 ctrlFlag = "" loop remove thisControl from ctrlmap at ctrlPos setting ctrlFlag ctrlType = Get_Property( thisControl, "TYPE" ) cMenu = ContextMenu( thisControl, "CREATEMENU" ) while ctrlFlag repeat |
Using Another Control's Menu Example
Code Block |
---|
To create a menu from a different control: status = ContextMenu(CtrlEntId,'CREATEMENU','','','','','CUSTOMERS.NAME') |
|
Modify and Creating Context Menus Programmatically
...