- Configuring the automatic menu in a TreeView control
Context menu of TreeView controls (AAF)
Each TreeView control found in a window proposes a popup menu to the user.
This menu, available without programming, proposes several actions:
- copy (the element, the row, the column or everything). Copying the column is used to copy the entire content of the treeview branches into the clipboard. The different elements are separated by CR characters (Carriage Return).
- expand or collapse all: This option is used to expand or collapse all the elements of the current branch.
- export to Word, Excel, XML: This option is used to export the content of the TreeView control into a file in the specified format.
- The same popup menu is available for the treeview section of a TreeView Table.
- You can add options to this menu from the code. To do so, use the PopupMenu property.
Configuring the automatic menu in a TreeView control
The popup menu of the TreeView control can be disabled. To configure the display of the context menu associated with the TreeView control, you must:
- Display the description window of the TreeView control.
- Select the "UI" tab.
- Choose the desired menu in the "Popup Menu" combo box. You can:
- "Display the menu of AAF (System)": In this case, the automatic menu of the TreeView control will be displayed. For more details on how to configure this menu, see Configuring the AAF menu.
- "Add a context menu": If this option is checked, you can select the custom context menu to be displayed.
- If both options are checked, the custom context menu can be added before or after the AAF menu.
- If no option is selected, no context menu will be selected. The <Disabled> option will be displayed in the description window.
- The PopupMenu property is also used to remove the AAF-specific context menu and restore the standard Windows menu for a given control.
- Through programming, AAFDisable is used to delete some options from the AAF context menu specific to the TreeView controls. For example, the aafTableToExcel, aafTableToWord and aafTableToXML constants are used to disable the export features.