4D v13.4Menu selected |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13.4
Menu selected
Menu selected
Menu selected is used only when forms are displayed. It detects which menu command has been chosen from a menu and, in the case of a hierarchical submenu, returns the reference of the submenu. Tip: Whenever possible, use methods associated with menu commands in an associated menu bar (with a negative menu bar number) instead of using Menu selected. Associated menu bars are easier to manage, since it is not necessary to test for their selection. The Menu selected command can be used to work with hierarchical submenus. When selecting a hierarchical menu item beyond the first level, the command returns, in the optional subMenu parameter, the reference (MenuRef type, 16-character string) of the submenu to which the selected item belongs. If the menu command does not contain a hierarchical submenu, this parameter receives an empy string. Menu:=Menu selected\ 65536 You can also extract these values using the bitwise operators as follows: Menu:=(Menu selected & 0xFFFF0000)>>16 If no menu commands are selected, Menu selected returns 0. The following form method uses Menu selected to supply the menu and menu item arguments to SET MENU ITEM MARK: Case of Note: The On Menu Selected form event is not activated if no item is selected, $refMenuIncludingItem is always given a value and $MenuNum equals 0 if the menu is not one of the menus of the menu bar. |
PROPERTIES
Product: 4D
INDEX HISTORY
Modified: 4D v11 SQL SEE ALSO |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||