|
|
|
|
|
- Overview of the Context Menu control
- Creating a Context Menu control
- Other creation modes
- Characteristics of the Context Menu control
- Associating a context menu with an element
- How to?
- Listing the available context menus
- Editing a context menu
- Deleting a context menu
The Context Menu control (WEBDEV)
Overview of the Context Menu control Context menus are often used in websites. WEBDEV includes a specific control to handle these context menus: the Context Menu control. Options are created in the same way as for a drop-down menu. A context menu can be associated with a control, a control template or an entire page. Creating a Context Menu control To create a Context Menu control: - On the "Page" tab, in the "Edit" group, expand "Context menus" and select "New context menu".
- The Context Menu control appears in the editor.
- Add menu options to the new context menu. For more details, see Handling menu options.
Other creation modes You can also create a custom context menu: - from the "UI" tab of the description of a page or control. Simply click the button to the right of the "Context menu" combo box and select "Create a new context menu". A page for editing the new custom context menu opens. This context menu will be automatically associated with the current element (or with all the elements in case of multi-selection).
- from the "Manage context menus" window. Simply click the "New" button and enter the name of the new context menu.
Remark: To open the "Manage context menus" window, go to the "Page" tab, "Edit" group, expand "Context menus" and select "Edit".
Characteristics of the Context Menu control To edit the description of the context menu currently displayed in the editor: - On the "Modification" tab, in the "Quick edit" group, click "Description".
- The control description window appears.
Remark: You can also open the description window of the context menu via a right click. The main characteristics are as follows: - Menu orientation ("General" tab): The options are as follows:
- Vertical Popup (default): The submenu of a context menu option opens next to the parent option.
- Vertical Drop-down: The submenu of a context menu option opens below the parent option.
- Selected option ("General" tab): Context menu option selected by default.
Remark: The option selected by default can be changed programmatically using the Selected property. - Value of page controls ("UI" tab): Specifies that the process will be executed on the controls of the page (send values to the server, don't send, etc.). By default, no data is sent to the server when a context menu option is clicked.
At runtime: - opening the context menu does not dim disabled windows.
- the context menu is opened either programmatically or by right-clicking a control associated with the context menu.
- the context menu is closed automatically.
Remarks: - The space between menu options cannot be adjusted.
- The menu style allows you to define the appearance of the menu options (colors, font, etc.).
Associating a context menu with an element How to? To associate a custom context menu with one or more elements (page or controls): - Select the elements you want to associate with the context menu.
- Go to the "UI" tab in the description window of the current element(s) ("Description" in the context menu).
- The "Context menu" combo box allows you to configure the context menu:
- the button is used to create a new context menu.
- you can select the desired context menu in the combo box.
- Validate.
Remarks: - To edit the selected context menu, click the button to the right of "Context menu" combo box and select "Edit this context menu".
- To programmatically associate a page or control with an existing context menu, use the ContextMenu property.
Listing the available context menus To get all the custom context menus available for a given page, go to the "Page" tab, "Edit" group, expand "Context menus" and select "Edit". These context menus can be associated with this page or with the controls in this page. A context menu can be edited via one of the following methods: - on the "Page" tab, in the "Edit" group, expand "Context menus" and select "<ContextMenuName>".
- from the "UI" tab of the description of a page or control associated with this context menu:
- Select the context menu you want to edit from the "Context menu" combo box.
- Click the button to the right of the "Context menu" combo box and select "Edit this context menu".
- from the "Manage context menus" window:
- Select the context menu you want to edit.
- Click the "Open" button.
To delete a context menu: - On the "Page" tab, in the "Edit" group, expand "Context menus" and select "Edit".
- Select the context menu to delete.
- Click "Delete". The page and/or controls associated with the deleted context menu will no longer be associated with a context menu.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|