JMRI: Panel Tooltips
Author: Dave Sand
Keywords: JMRI help tooltips

# Panel Tooltipssince 4.99.3

A tooltip is a bit of information that is displayed when the mouse pauses over an item on a panel. The information can be the name of an icon, a short instruction, or some other useful information. The three main JMRI panel editors support tooltips for icons that relate to JMRI components such as sensors, turnouts, etc. Standalone icons and text labels can also have tooltips.

### Overview

The default `user name (system name)` tooltip for table items does not store any data. It uses the current names when showing the tooltip. This eliminates problems when user names are changed or moved to a different system name. The default tooltip for standalone icons is Icon and for text labels the default is Text Label.

Custom tooltips can be created. This data is stored. The custom content can have the current `user name (system name)` information added to the front of the custom tooltip.

since 5.7.2Tooltips are not shown for items that have the Hide when not editing option enabled and the panel is not in edit mode.

Existing tooltip content is not automatically removed. Depending on the age of the panel and its icons, it may have old content. The ClearTooltips.py script can be run to clear the old tooltip content. From the main PanelPro menu, select Scripting ⇒ Run Script.... The script is included with the JMRI install and it is located in the jython directory.

### Editor Options

Each editor has an option to enable or disabled tooltips for its panels. Each tooltip also has an option to show or not show its tooltip content. This provides the ability to control the tooltip process. For example, a panel can have tooltips enabled with individual icons set to not show a tooltip. The reverse is also possible when tooltips are disabled for the panel with individual icons set to show a tooltip.

Note: Changing the panel option for showing tooltips results in setting every panel item to show or not show its tooltip.

Panel Editor

  When the panel is in edit mode, use the Show Tooltips for all items option to enable or disable tooltips for the panel.

  Note: The panel is in edit mode when the Panel items popup menus active item is enabled. Closing the editor window does not change the edit mode.

Control Panel Editor

  When the panel is in edit mode, select the Options menu and use the Show Tooltips for all items menu item to enable or disable tooltips for the panel.

Layout Editor

  The Layout Editor has several options for displaying tooltips.

  since 5.7.2The two tooltip edit mode options reset all of the tooltips when the Layout Editor Edit Mode option is changed. When Always or Never is selected, changes to the edit mode do not affect the individual item settings.

  Note: Layout Editor does not display tooltips for track components except for turnouts and slips (as of JMRI 5.3.6). These are drawn using a set of lines. They are not icons.

### Tooltip Options

The default tooltip shows the user name and system name of the related JMRI item.

The icon context menu (right click) has an entry for Tooltips with 3 menu items. Note: The Layout Editor turnout and slip context menus do not have a tooltips sub menu even though they show tooltips as of JMRI 5.3.6.

Show Tooltip
  This is set active when tooltips are enabled for the panel and inactive when tooltips are not enabled for the panel. Click on the menu item to override the default value for the selected icon.
Set Custom Tooltip...
  The default tooltip displays the user name and system name for the object related to the icon. The custom tooltip item can be used to display a different value. Enter the text to be displayed in the window that opens when this item is clicked. To revert to the default text, remove the text from the window text field.
Prepend Display Name to custom tooltip
  The default value will be added the beginning of the custom tooltip. This makes it possible to have both the default name and additional text. For example: `Sensor Name (IS101): Used to trigger a Route`.