Radio Button Control Properties

Top  Previous  Next

A Radio button, also called an option button, provides the user one of a set of mutually exclusive choices. By default, a filled-in circle represents the current selection.

A group box--an OPTION structure--must always surround the radio button choices. The Window Designer automatically prompts you to create this if you try to place a radio button outside an option box. When the user selects a choice, the control fills the USE variable with the Radio text, minus the ampersand indicating the accelerator key.

When you place a radio button in a blank dialog window, it forces the creation of the OPTION STRUCTURE. After activating the Radio Button tool, or choosing Radio Button from the Control menu, CLICK in the window. An option box and one radio button appear. Select the radio button and press the Properties button, or RIGHT-CLICK and select Properties to open the Radio Button Properties dialog.

The Property View presents you with two ways to viewing a control’s properties.

At the top of the Property View, press the categorized button to view a control’s properties by category (the deafult).

Or press the alphabetical button to view a control’s properties in alphabetical order.

This help documents displays the properties in the categorical view.

Color

Enter a valid color equate in the TextColor or BackGround fields, or press the ellipsis (...) button to select a color from the Color dialog. The Window Designer adds the COLOR attribute to your control declaration.

See ..\LIBSRC\EQUATES.CLW for a list of valid color equates. See Windows Design Issues in the User's Guide for a discussion on using color to enhance your application.

 

Design

Locked

"Freezes" the control so that subsequent data dictionary changes are not applied. You can override the #Freeze attribute for all controls or for individual controls. See Application Options.

Tab Index

Determines the index in the TAB order that this control will follow. The first tab in the order is index zero (0).

To change the TabIndex property immediately while in the Designer, use the Show tab order interface (i.e. on the right-click menu).

If you set the TabIndex property using the property page, the z-order is not updated until you save and exit the Window Designer.

Extra

Drop ID

To specify the type of Drag operations this control will accept, type up to 16 signatures, separated by commas. The Window Designer adds the DROPID attribute to the control, which indicates the control is a valid target for the drag and drop operations identified by the signatures.

Icon

In the Icon field ( ICON ), optionally select a standard icon or icon file. This displays a small bitmap on the button face (clipping or centering the bitmap as necessary).

To select a standard icon, choose one of the named items in the drop-down list. To select an icon file (whose extension must be .ICO), choose Select File from the drop-down list, then pick the file using the standard file dialog. At run time, the radio button appears as a "latched" 3D push button.

General

Justification

Left Justification arranges the button (or icon) to the left of the parameter text. Right Justification arranges the button (or icon) to the right of the parameter text. Default arranges the button according to any applicable settings in the data dictionary.

Layout

Indicates the orientation of the control. Left to Right maintains the original layout specified in the Window Designer. Right to Left essentially "flips" the controls’ display as a mirror image of the layout specified in the Window Designer. Default field navigation moves from right to left. The setting in the Application Frame will cascade its setting to all child windows and controls that have the default setting active.

Text

Specify a string constant to display. Place an ampersand (&) before the single character to set the accelerator key or mnemonic access character for the radio button--this underlines the label that appears next to the radio button.

TextFont

Calls the Select Font dialog which lets you select the font (typeface), size, style (such as bold or italic), color, and font effects (underline and strikeout) for the selected control or window. As you choose options, the dialog box displays a sample of the selected font.

Use

This defines the USE attribute for the control. The field equate label references the radio button in program statements.

Value

When the user selects a radio button, the OPTION's USE variable receives the value that you specify here. The value you enter should match the data type of the OPTION's USE variable.

If you leave the Value field blank, the OPTION's USE variable receives either the string found in the Text field, or the button number, depending on the data type of the OPTION's USE variable.

The button number corresponds to the button's position within the option box. From the Window Designer choose Edit Order Control dialog to see the button's tab order position within the option box.

Help

Alert

Press the ellipsis to open a dialog that lets you add the ALRT attribute to a window or control. When the attribute is set, the window generates an EVENT:AlertKey if the user presses the key(s) you specify in this dialog, while the window has the focus.

Cursor

The Cursor field (the CURSOR attribute) lets you specify an alternate shape for the cursor when the user passes the cursor over the control. The drop-down list provides standard cursor choices such as I-Beam and Crosshair. To select an external cursor file (whose extension must be .CUR), choose Select File from the drop-down list, then pick the file using the standard file dialog.

HelpID

The Help ID field (the HLP attribute) takes a string constant specifying the key for accessing a specific topic in the Help document. This may be either a Help keyword or a context string.

A Help keyword is a word or phrase indexed so that the user may search for it in the Help Search dialog. When you fill in the HLP attribute for a button, if the entry box has focus, when the user presses F1, the help file opens to the referenced topic. If more than one topic matches a keyword, the search dialog appears.

When referencing a context string in the Help ID field, you must identify it with a leading tilde (~).

Key

Press the desired key or key combination (for example, CTRL+H). The keys you pressed will appear in the Key field, and will be supplied as parameters to the KEY or ALRT attribute for this control. The ESC, ENTER, and TAB keys cannot be specified by pressing them. For these keys, press the ellipsis (...) button and type "esc," "enter," or "tab."

Message

The Message field (the MSG attribute) lets you specify text to display in the first zone of the status bar when the control has focus.

Tip

The TIP attribute on a control specifies the text to display in a "balloon help" box when the mouse cursor pauses over the control. Although there is no specific limit on the number of characters, the string should not be longer than can be displayed on the screen.

 

Mode

Disable

Disables or 'grays-out' the control when your program initially displays it. The Window Designer places the DISABLE attribute on the control. Use the ENABLE statement to allow the user access to the control.

Hide

Makes the control invisible at the time Windows would initially display it. Windows actually creates the control--it just doesn't display it on screen. The Window Designer places the HIDE attribute on the control. Use the UNHIDE statement to display the control.

Scroll

Specifies whether the control should move with the window when the user scrolls the window. By default (False) the control does not move with the window. Set the Scroll property to False to create a control that stays fixed when the user scrolls the window. The Window Designer places the SCROLL attribute on the control when checked.

Skip

Instructs the Window Designer to omit the control from the Tab Order. When the user TABS from field to field in the dialog box, Windows will not give the control focus. This is useful for seldom-used data fields. The Window Designer will place the SKIP attribute on the control.

Transparent

Specify whether you wish the control background to be Transparent. This instructs Windows to suppress the rectangular region around the text--the background. Normally, Windows will paint this the same uniform color as the window below the control. This adds the TRN attribute.

 

Options

Flat

The FLAT attribute (PROP:FLAT) specifies the BUTTON, CHECK, or RADIO with an ICON attribute appears flat until the mouse cursor passes over it. With radio buttons, this creates a "latched" button effect.

Position

Lets you set the location and size of the control.

The Position tab lets you specify the AT attribute. Filling in the attribute manually is optional--you may set the position and size visually by dragging with the mouse in the Window Designer.

To set the location of the control's Top Left Corner, set an X (horizontal) and Y (vertical) coordinate in Dialog units. The coordinate is relative to the top left corner of the structure containing it, that is, the window or the report band.

To set the control's size, choose from the following options for Width and Height.

Default

The Clarion runtime library determines the size of the control based on the applicable font and picture token.

Full

The control is the full height or width of the window or report.

Value

Lets you set a precise width or height in Dialog units on a window, or in thousandths of inch, points, or millimeters on a report.

Quick Links

 

Embeds

Accesses the Embedded Source dialog for points surrounding the event handling for this control only.

 

 

Actions

The Radio Button Actions category leads to other dialogs allowing you to name variables and change their values when the end user checks or unchecks the box. Additionally, you can HIDE or UNHIDE other controls in the window.

Two group boxes with two pairs of buttons appear on the Actions tab.

Assign Values

Opens the Assign Values dialog where you can assign values to variables based on the on or off state of the radio button.

Hide/Unhide Controls

Opens the Hide/Unhide Controls dialog where you can specify window controls to hide or unhide based on the checked or unchecked state of the check box.

 

 

Assign Values Dialog

Lets you assign values to variables based on the on or off state of a radio button. You may specify multiple assignments. Press the Insert button to add a new assignment.

Variable to Assign

In the entry box, type a variable name, or press the ellipsis (...) button to choose or create a data dictionary field or a memory variable with the Select Field dialog.

Value to Assign

In the entry box, type the value to assign to the variable. You can then add code to your program to take appropriate action based on the run time value of the variable(s). Press the E button to call the Expression Editor. This dialog is used to help you construct syntactically correct expressions to use in the appropriate prompt.

Hide/Unhide Controls Dialog

Lets you specify window controls to hide or unhide based on the on or off state of a radio button. You may specify multiple controls to hide/unhide. Press the Insert button to add a new hide/unhide action to the list.

Control to hide/unhide

From the drop down list, choose the control to HIDE or UNHIDE.

Hide or unhide control

From the drop down list, choose Hide or Unhide.

 

Enable/Disable Controls Dialog

Lets you specify window controls to enable or disable based on the on or off state of a radio button. You may specify multiple controls to enable/disable. Press the Insert button to add a new enable/disable action to the list.

Control to enable/disable

From the drop down list, choose the control.

Enable or Disable control

From the drop down list, choose Enable or Disable.