Menu Programming

 

Documentation home

 

 

See also: Menu Structures, Vertical Menu Control, Horizontal Menu Control, Menu Item Control, Dynamic Menu Item Control, Menu Sharing

 

 

Menu events

A single event can be established that receives control when any item in the menu is clicked; this event is set using the On click property of either a Vertical Menu Control or a Horizontal Menu Control. This event can check which menu item has been selected by the user and then take appropriate action. If required, this menu level event can be overridden for individual Menu Item Controls or for Dynamic Menu Item Controls by setting the appropriate Override On click property.

 

Selected Menu Item

Each menu item is uniquely identified by its Item name property. When the user clicks on a menu item the selected property of the parent Vertical Menu Control or Horizontal Menu Control will contain the selected item name. This property can also be set.

 

Reading…

 

FPL:

API based language (Javascript):

 

if [ MENU1.selected = 'Tax' ]

  goto page TAX_DETAILS;

endif

if [ MENU1.selected = 'Accounts' ]

  goto page ACCOUNTS;

endif

 

 

switch (controls.MENU1.selected)

{

   case "Tax": form.gotoPage(pages.TAX_DETAILS);

               break;

   case "Accounts": form.gotoPage(pages.ACCOUNTS);

               break;

}

 

 

Setting…

 

FPL:

API based language (Javascript):

 

set MENU1.selected = 'Summary';

 

 

controls.MENU1.selected = "Summary";

 

When a menu is shared, the selected property can be read or set via any of the sharing Menu Controls.

Loading menu structures dynamically

Any part of a menu structure can be loaded dynamically at runtime. Click here for details.