ProvideX V8.20 > Language Reference > 2. Directives
49
Combined options can be used to create several different check box types. The "f", "T",
and "U" options provide the ability to turn check boxes into hotspots, which allows for
clickable areas on bitmaps or hyperlinked text in dialogues; e.g.,
Creates a general hotspot.
"VTf"
Creates an HTML-like hotspot (e.g., URL hyperlink).
"VUTf"
Creates a word-style toolbar with drop list
"F^"
Description
Use the CHECK_BOX directive to create/control a check box object on the screen or to
place a Taskbar Notification Icon, p.817. The user can toggle check boxes between
two states: ON to check the option or OFF to uncheck it. (If you need a third state for a
check box, refer to the TRISTATE_BOX Directive, p.342.)
CHECK_BOX contents$
The contents$ string expression defines the text or picture to appear on the check
box. In the text, you can use an ampersand "&" preceding a character to identify it as
a hot key the user can press in conjunction with the Alt key to activate the check
box from the keyboard. By default, the text is displayed to the right of a check box.
Add a colon ( : ) to the end of the text field to force the text to display to the left side.
Using Images
When adding an image to a check box, enclose the image name in curly braces. Use a
leading exclamation point (!) to identify the image as internal, or specify the relative
path and filename to access an image file that is external. There are no icons in the
ProvideX executable and ProvideX does not support retrieving icons from either
resource libraries or other system DLLs /executables. For more information on the
options available for displaying internal/external images and the recognized image file
types, refer to Displaying Controls/Images, p.815.
When you use text as well as images, the relative positions of the image and the text
set their relative placement. The following are example contents$ expressions:
"{!Add}Add" ! Displays the {!Add} bitmap in front of the text "Add"
"Delete{!Del}" ! Displays the {!Del} bitmap after the text "Delete"
If you enclose two images separated by a pipe | vertical bar in a single set of curly
braces, the first will be displayed when the CHECK_BOX state is 0 (zero for
OFF/normal state), the second when the CHECK_BOX state is 1 (ON); e.g.,
"{!Stop|C:\MYBMP\Go}"
You can also use the OPT="B" clause for a Bitmap Button to display different images
for different states.
Check Box Properties
The Apostrophe Operator can be used with the unique logical identifier (ctl_id) to
dynamically read and alter a wide variety of control attributes (properties) directly
from the programming language. The list of properties available for manipulating a
check box object are described in Chapter 7. Control Object Properties, p.700.