Displaying tool-tips on hover over Feathers UI components

In desktop apps, users expect to be able to hover their mouse over a UI component to display a tool-tip with some descriptive text about the component.

Enabling the Tool-Tip Manager

Feathers UI automatically enables tool-tip support when your main class extends the Application component.

import feathers.controls.Application;

class MyProject extends Application {
  public function new() {
    super();
  }
}

However, if a project isn't using the Application component, tool-tip support may be enabled manually by calling ToolTipManager.addRoot() when the project first starts up.

// only when not using the Application component
ToolTipManager.addRoot(stage);

Setting a component's tool-tip

In the following example, a Button is given a tool-tip.

var button = new Button();
button.text = "Click Me";
button.toolTip = "Some useful information";
addChild(button);

All Feathers UI components have a toolTip property.