Tool Button Controls
Tool buttons are similar to push buttons, with some significant differences. A tool button:
-
Displays more information (mouse position, mouse button, Ctrl and Shift key status, etc.).
-
Can display either text or a picture (bitmap).
-
Can operate normally or as a toggle (click on, click off), which can be queried.
-
Can use the 'COLORSET' or 'OPTIONS' mnemonic to modify the displayed color.
-
Cannot be focused with keyboard navigation commands.
-
Does not include a "focus rectangle" when it has focus.
Typically, tool buttons are grouped together in a tool bar.
Creating
Mnemonic |
Description |
Create a Tool Button Control. |
Manipulating
Mnemonic |
Description |
Set Control Title. Including the '&' before a character in the title causes it to be an accelerator. |
Querying
CTRL() Function |
Information Returned |
0 |
Outer rectangle of the control in current scaled units. |
1 |
Tool button title or bitmap image filename. |
2 |
Up/down status of the tool button. |
4 |
Control class and type. |
8 |
Visible/invisible and enabled/disabled status of the control. |
15 |
Background color of the control. |
16 |
Foreground color of the control. |