OWLNext 7.0
Borland's Object Windows Library for the modern age
|
The hint mode of a gadget dictates when hints about the gadget are displayed by the gadget window's parent.
You can set the hint mode for a gadget using the TGadgetWindow::SetHintMode function:
The enum THintMode has three possible values:
hintMode | Display status |
NoHints | Hints are not displayed. |
PressHints | Hints are displayed when the gadget is pressed until the button is released. |
EnterHints | Hints are displayed when the mouse passes over the gadget (when the mouse enters the gadget). |
You can find the current hint mode using the TGadgetWindow::GetHintMode function:
Another function, the TGadgetWindow::SetHintCommand function, determines when a hint is displayed:
This function is usually called by a gadget through the gadget's Window pointer to its gadget window, but the gadget window could also call it. Essentially, SetHintCommand simulates a menu choice, making pressing the gadget the equivalent of selecting a menu choice.
For SetHintCommand to work properly with the standard ObjectWindows classes, a number of things must be in place: