
BBjWindow::addToolButton
Description
Adds a tool button control in the BBjWindow.
Syntax
Return Value |
Method |
addToolButton(int ID, int x, int y, int width, int height, string title) |
|
addToolButton(int ID, int x, int y, int width, int height, string title, string flags) |
Parameters
Variable |
Description |
|
ID |
Control ID number. It must be an integer between 1 and 32767 and be unique within a given top-level window. |
|
x |
Horizontal position of the upper-left corner of the tab control. |
|
y |
Vertical position of the upper-left corner of the tab control. |
|
width |
Width of the control in current units. |
|
height |
Height of the control in current units. |
|
title |
Tool button title. The title can be ordinary text or "BITMAP=", followed by a path name. (PREFIX is not searched.) If the BITMAP= syntax is used, an attempt is made to locate and load a bitmapped image (see the 'IMAGE' mnemonic) from that file. If it succeeds, the image is drawn in the button. Otherwise the text, complete with "BITMAP=", is displayed. The title or bitmap can be changed at any time with the 'TITLE' mnemonic. Including the '&' before a character in the title causes it to be an accelerator. |
|
flags |
Control flags, as follows: |
|
|
Flag |
Description |
|
$0001$ $0002$ $0004$ $0010$ $0020$ $0400$ $0800$ $1000$ $2000$ $4000$ $8000$ |
Sets the control to be initially disabled. Places title text to the left of the control. Sets the control to be initially checked. Sets the control to be initially invisible. Designates the control to be part of a keyboard navigation group. Creates a "click on, click off" toggle button. Draws a recessed client edge around the control. Draws a raised edge around the control. Left-justifies tool button text. Centers tool button text. Right-justifies tool button text. |
Return Value
Returns the created BBjToolButton object.
Remarks
A tool button:
-
Displays additional information (mouse position, mouse button, Ctrl and Shift key status).
-
Can display either text or a picture (bitmap).
-
Can operate normally or as a toggle (click on, click off).
-
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.
Example
REM Add a tool button to a window |
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.