This article documents shows you how to change the appearance of a menu or sub-menu, like the File or Edit menu.

If you are trying to customize the appearance of a menu item such as the File → Open item, you need to use the The available action bar configuration options.

For each item in an action bar menu or sub-menu, you can

  • Specify an icon

  • Determine whether the menu item displays text or not

Specify a menu icon with the prefix.menu.xxx.smallIcon key. Replace the xxx part in the key with a dot-separated list of the menu path items leading to the menu.

For example, to define an icon for the sub-menu Map → Data, use the property: prefix.menu.Map.Data.smallIcon = path/to/the/icon.png.

Hide the name by setting the value for key prefix.menu.xxx.showActionName to false. You must replace the xxx part in the key with a dot-separated list of the menu path items leading to the menu.

For example, to remove the text for the sub-menu Map → Data, use the property: prefix.menu.Map.Data.showActionName = false.

Example: replacing the Edit menu in the drawing toolbar with an icon

By adding the following lines to the configuration file of the drawing add-on:

Program: The configuration options for the edit menu of the drawing bar
TLcyDrawingAddOn.drawingToolBar.menu.Edit.smallIcon = edit
TLcyDrawingAddOn.drawingToolBar.menu.Edit.showActionName = false

you replace the standard Edit menu from the drawing bar with an icon:

drawing bar custom edit menu
Figure 1. Drawing tool bar where the Edit menu only shows an icon.