Applies to HTML Viewer, IE Browser publications. - The menu bar displays the standard GUI menus at the top side of the main window. By default publications contain four menu items: File, Edition, Navigate and Help with various menu commands that let your end users navigate through your web pages, select and copy text parts, print pages...
The properties of these four menu items can be modified thanks to the Menu Bar component available in the User Interface tab.
The menu editor allows you to add new menu items to the menu bar or the context menu, and associate commands with them. To open the menu editor, go to the User Interface tab, select "Menu Bar" and click the "Edit" button.
Description of the editorOn the left side you see the menu tree that lists all of the menu items. The four predefined menus (File, Edition, Navigate and Help) are already in the list: you can select them in order to add new menu children but you are not allowed to remove them (if you want to remove a predefined menu item, you can set its Visible property to False in the Menu Bar component) nor to edit their properties. 
To add a new menu item, click Add. A sub-menu will appear with two commands: "New Item" or "New Child Item" (not available for the context menu). Select "New Item" to add a top menu item; otherwise if you choose "New Child Item", the new menu item will become a child of the selected item (in the menu tree). You will then be prompted to enter the caption for this menu item. Note: menu items which are already children of another menu item cannot have children themselves. To edit a menu item, select it in the menu tree and you can then modify its properties (which are shown on the right side).
Each menu item has the following properties: - Name: this is a unique internal identifier used by HTML Executable and script commands. Only alphanumeric characters are allowed without spaces.
- Caption: the title of the menu item (what end users see in the menu bar). You can use resource strings by enclosing the resource string's identifier into two percent symbols (%SPubTitle% for instance).
- Action: defines the action executed when the end user clicks on the menu item. See below.
- Absolute Index (only for advanced users): this special property is only available if your custom menu item belongs to a built-in menu (all publications have built-in menus like File, Edition, Help...). It lets you set the value indicating the position of the menu item in its parent menu, thus you can reposition a menu item to a different location within its menu. For instance, a value of "0" will place the item at the top.
 | Be sure to click Apply after you have modified the properties of a menu item, otherwise they won't be saved! |
To remove a menu item, select it in the menu tree and click Remove.
You can reorder the menu items using drag/drop operations. Note that the order of the four predefined menus cannot be modified (but you can insert other menu items between them).
Actions of the menu itemsEach menu item can execute an action when it is clicked. You can select between three actions: - Do nothing: no action is executed. Highly recommended if the corresponding menu item contains children.
- Show this page/URL: this menu item will open the specified HTML page or a URL. You can select a page of your publication by clicking on the small button near the field.
HEScript commands are also accepted (hescript://[scriptname].[functionprocedurename]), see this topic for more information. For example, if you enter hescript://Macros.MacroShowAbout, then the menu item will show the about box when it is clicked. - Execute this script function: a HEScript script procedure or Boolean function is executed. Syntax: [scriptname].[functionname]. Parameters are not allowed, and only procedure or Boolean functions are accepted. If you want to pass parameters, then you should use a hescript:// call as explained above.
You can for instance call pre-defined macros.
Menu separatorSpecify a hyphen character (-) as the value of Caption for the menu item to indicate that the menu item is a separator. Separators should have their action set to "Do nothing". |