FMX.MouseOverHints Sample

From Appmethod Code Examples
Jump to: navigation, search

This sample shows how to use hints to show contextual help.


You can find the MouseOverHints sample project at:


The MouseOverHints sample demonstrates how to use hints to show contextual help.

The sample shows how to work with hints, and the special behavior that some components, such as status bars, actions, and menus, have when working with hints.

How to Use the Sample

  1. Navigate to one of the locations given above and open:
    • Object Pascal: MouseOverHints.dproj.
    • C++: MouseOverHints.cbproj.
  2. Select the target platform.
    Note: The MouseOverHints sample is supported by desktop platforms, see Platform Support for Hints for further details.
  3. Press F9 or choose Run > Run.
  4. Use the check boxes to change the different options and place the mouse over the buttons, menu items, and panel to see hints.
    MouseOverHints Sample.png


File in Object Pascal File in C++ Contains



The project itself.



The main form where the components are located.


MouseoverHintsForm.h, MouseoverHintsForm.cpp

Used to define and implement the sample.


Setting and Showing Hints

  • The TApplication.ShowHint property is used to enable or disable the hints for the sample application. Disabling the hints of the application disables the hints from all controls.
  • The TForm.ShowHint property is used to enable or disable the hints of the form.
  • The GetLongHint method is used to get the long version of the hint. The long version of the hint is the one written after the | (pipe) character.

See more information about enabling hints.


The TActionList component is used to maintain a list of some of the actions used in the sample.

  • The TAction.OnHint event is used to set or change the hint of the client control. Setting the hint with OnHint changes the hint that displays by default.

See more information about actions and hints.

Status Bar

The TStatusBar control works in a different manner for hints.

to allow the status bar to intercept all hints from the application.
  • Since TStatusBar.AutoHint is True

, the TStatusBar.OnHint event occurs when any hint in the application is triggered.

See more information about status bar and hints.


Since the menu items do not display hints as other controls do, the Label1 displays the hints of the menu items when the TStatusBar.OnHint event occurs.

See more information about menus and hints.


See Also