Section Menus
Under Construction
For Footer Menus, see Section Footers.
Contents
Visible
By default, the Section Menu is not visible.
To make the Section Menu visible, check the Visible attribute to True.
Height
The Height attribute is used to specify the Section Menu height.
Background color
The Background color is used to specify the menu background color.
Click the [...] button to access the 'Select Color' dialog.
Foreground color
The Foreground color is used to specify the menu foreground color.
As above, click the [...] button to access the 'Select Color' dialog.
The menu is specified as a comma-separated list of menu items. By default, the menu items are left-aligned.
To display the menu items centered, prefix the list of values with |.
To display the menu items right-aligned, prefix the list of values with >.
Note: a < can be used for left-alignment.
Menu items can have a single-level pulldown. The pulldown items are | separated and enclosed in parentheses.
Menu items with a pulldown are displayed with a down arrow to the right of the item text. Click the arrow to display the pulldown and then select an item.
The Custom menu attribute can be queried or changed programmatically using Lianja.getElementByID("page.section").menu.
Custom action
When a menu item is selected, the action specified in the Custom action attribute will be performed.
The action is a SHOWDOCUMENT() action.
The selected menu item can be accessed via {}.
If no Custom action is specified, the Custom section menu Custom Delegate will be run if set.
If no Custom action is specified, the Custom section menu Custom Delegate will be run when a menu item is selected.
This can be a single line inline delegate.
The selected menu item can be accessed via {}.
Or it can be the name of the script function to be called. The selected menu item text is passed to the function as a parameter ('selitem' in the examples below).
Click the [...] button to create and edit the script function. The Section Scripting Language attribute determines the language used.
Lianja/VFP function example
//////////////////////////////////////////////////////////////// // Event delegate for 'customsectionmenu' event proc employees_section1_customsectionmenu(selitem) do case case selitem = "page2" messagebox("You selected page2") case selitem = "page3" messagebox("You selected page3") otherwise messagebox("You selected page4") endcase endproc
JavaScript function example
//////////////////////////////////////////////////////////////// // Event delegate for 'customsectionmenu' event function employees_section1_customsectionmenu(selitem) { if (selitem == "page2") { messagebox("You selected page2"); } else if (selitem == "page3") { messagebox("You selected page3"); } else { messagebox("You selected page4"); } };
Notes on Client Support
Attribute | Notes |
---|---|
Visible | - |
Height | - |
Background color | The Background color is supported on the Desktop client only. |
Foreground color | The Foreground color is supported on the Desktop client only. |
Custom menu | The | (center) and > (align right) prefixes are available on the Desktop client only. Menu items are always aligned left on non Desktop clients. |
Custom action | The Custom action is supported on the Desktop client only. |
Custom section menu | The Custom delegate script function must be written in JavaScript for non Desktop clients. Using an inline delegate is supported on the Desktop client only. |