| Directives |
|
| Formats | 1.
Define/Create: RADIO_BUTTON
[*]ctl_id:sub_id,@(col,ln,wth,ht)=contents$[,ctrlopt] 2. Delete: RADIO_BUTTON REMOVE [*]ctl_id:sub_id[,ERR=stmtref] 3. Disable: RADIO_BUTTON {DISABLE}[*]ctl_id:sub_id[,ERR=stmtref] 4. Enable: RADIO_BUTTON {ENABLE}[*]ctl_id:sub_id[,ERR=stmtref] 5. Set Focus: RADIO_BUTTON GOTO [*]ctl_id:sub_id[,ERR=stmtref] 6. Logical Push/Release: RADIO_BUTTON { ON | OFF}[*]ctl_id:sub_id[,ERR=stmtref] 7. Read Activation Mode: RADIO_BUTTON READ [*]ctl_id,var,mode$[,ERR=stmtref] 8. Hide/Show: RADIO_BUTTON {HIDE | SHOW}[*]ctl_id:sub_id[,ERR=stmtref
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| Description | Use
the RADIO_BUTTON directive to create and
control a group of radio button control objects on the
screen. A radio button group is a series of related
circular/radio-knob buttons (akin to check boxes) of
which only one button can be active at a time. When a
user selects one of the radio buttons, that selection is
activated (on) and all other related radio buttons are
automatically reset to off.
The single character
parameters for OPT=char$ are
listed below:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
Options can be combined to create several different button types. The "f", "T", "U", "u", and "o" options provide the ability to turn buttons into hotspots. This allows for clickable areas on bitmaps, or items such as HTTP URL links on dialogues; e.g.,
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| RADIO BUTTON
contents$ The contents$ string expression defines the text/picture (bitmap or icon) to appear on the radio button. 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 radio button from the keyboard; e.g., 0010 RADIO_BUTTON
100:1,@(2,14,12,2)="&Daily" This would create a group of three radio buttons that will each generate a CTL=100 when pressed. Their individual sub_ids are 1, 2 and 3. Their respective hot keys are ALT-D, ALT-W and ALT-M. When adding an image to a radio button, 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 internal/external images and recognized image file types, refer to Displaying Bitmaps/Icons. 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:
If a string expression includes two images separated by a vertical bar inside a single set of curly brackets, the first will be displayed when the radio button is off (normal state), the second while the radio button is on; For example:
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 radio button are described in Control Object Properties, . |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 1 | Define/Create
Use this format to create
a radio button. Unlike most other controls, related radio
buttons share the same ctl_id. That is, to group
common radio buttons together, you define each member of
the group using the same ctl_id and a different sub_id
The group ctl_id value generates a CTL value whenever any radio button in the group is pressed and must be unique. Use an asterisk [*] as a prefix for ctl_id to identify the group of radio buttons as global (not tied to a specific window). |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 2 | Delete
Use the RADIO_BUTTON REMOVE format to delete a radio button. By default all local radio buttons are deleted when a window is removed/dropped or the application issues a BEGIN. Global radio buttons can be removed manually or cleared with a START directive. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 3 | Disable
Use the RADIO_BUTTON DISABLE format to gray out a radio button and make it inaccessible to the user. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 4 | Enable
Use the RADIO_BUTTON ENABLE format to restore a disabled radio button. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 5 | Set Focus To
Use the RADIO_BUTTON GOTO format to set the focus on the radio button, ready for the user's next action. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 6 | Logical Push, Release
Use the RADIO_BUTTON ON format as a logical Push to make it appear that the radio button has been pressed. Use RADIO_BUTTON OFF to make it appear that the radio button has been released. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 7 | Read Activation Mode
The RADIO_BUTTON READ format returns the sub_id for the currently active radio button in your numeric variable. (The value is zero if none are active.) ProvideX returns a single-character hex value for the mode / keystroke the user chose to activate the last radio button. Possible values returned in mode$ can include:
To determine which RADIO_BUTTON sub_id has been pressed and the mode used: 0100 RADIO_BUTTON READ 1000,which,how$ |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 8 | Hide/Show
With the RADIO_BUTTON HIDE format, the radio button remains active, but is not displayed. It is still accessible programmatically. Use the SHOW format to restore the display and user access. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| See Also | BUTTON
Control Button CHECK_BOX Control Check Box TRISTATE_BOX Control Tristate Box, Control Object Properties |
|||||||||||||||||||||||||||||||||||||||||||||||||||