Creating Panel Controls

Radio Button Control

 

Radio Buttons are laid out in a group of one or more related button controls, each representing one possible value for the variable the group represents. Only one button can be active at a time; i.e. when one Radio Button is selected, no other buttons in the group are selected.

For more information on this control type, see RADIO_BUTTON directive.

Creating a Radio Button

To draw a new Radio Button on your panel, select the Radio Button control tool from the Controls Toolbar. Hold down the left-mouse button and drag the mouse to create a rectangle to the desired size. Release the mouse button to create the new object. You can also include text and/or pictures on Radio Buttons.

You can copy the first Radio Button to create identical Radio Buttons for the group (see Duplicating Components). Unlike other controls, a group of Radio Buttons must share the same name. When defining Radio Buttons, use the same control name but apply a different Index Value for each of the Radio Buttons in the group. In addition, only one button in a group can have the Tab Stop Attribute set.

Example:

You could define a group of three Radio Buttons called INSURANCE with each index (1, 2, 3) associated with a different option (Daily, Monthly, Yearly). At run time, if a user clicks the Radio Button labeled Monthly, an index value of 2 would be identified (e.g. to execute logic for a monthly breakdown). The other Radio Buttons in the group (in this case, Daily and Yearly) are turned off and lose focus.

A Radio Button control can also be created from a data class or a data dictionary element. See Data Class Controls and Data Element Controls.

To define the specific attributes for the new control, see Radio Button Properties.

Radio Button Properties

When creating or editing a Radio Button control, the Radio Button Properties dialogue (pictured below using the Folder Style version of the NOMADS designer) is displayed:

This dialogue is divided into the following tabbed panels for viewing and/or changing Radio Button properties: Display, Font/Color, Attributes, Value, Logic and User Aid.

Name

Radio Button name (NOMADS provides a default). Naming conventions for variables apply. Click the Browse Library button to copy parameters from an existing object (via the Library Browse dialogue). The same name is used for each Radio Button in the group; however, each requires a different Index Value.

Note:
When a new control name is entered, it will be checked against the Reserved Words list to determine if it is restricted for use as a NOMADS control name. If it is found, a warning message will display.

(User Reserved Words Maintenance was added in PxPlus 2020.)

Preview

Displays how the visible properties of the control will appear at run time.

Display

Text

Sets the button text. Click the drop-down arrow for a list of selections: Fixed, Expression, Message Library Reference.

Bitmaps

Sets the button bitmap. Click the Bitmap Library button to select a bitmap from the Bitmaps dialogue.

Normal

Bitmap shown when the button is released.

Pushed

Bitmap shown when the button is pressed.

Alignment

Sets the bitmap alignment. Click the drop-down arrow for a list of selections: Left, Right, Top, Bottom, Center/Scale. Selecting Center/Scale alignment also forces the selection of the Scale bitmap option.

Scale bitmap

Scales the bitmap to fit the button size. Any button text is forced to be aligned Center/Scale.

Note:
Top, Bottom and Center/Scale alignments and the Scale bitmap option only work in 4D mode.

(The Center/Scale alignment and Scale bitmap options were added in PxPlus 2019 Update 1.)

Image Options

(Available when Bitmaps for Normal/Pushed are selected)

Sets advanced image options for the bitmap. Click the Additional Image Options button to the right of the Image Options multi-line to invoke the Image Options dialogue.

    

This dialogue consists of the following:

Options

Image Transparency

Bitmap transparency option. Click the drop-down arrow for a list of selections: None, Pixel sets transparency or 'Light Gray' is transparent.

Flip Image

Flips the image. Click the drop-down arrow for a list of selections: None, Flip horizontally (left/right), Flip vertically (up/down) or Flip horizontally and vertically.

Rotation Angle

Counter clockwise rotation angle at which to display the image. Valid entries are 0 to 359.

Invert Image

Displays the image with inverted colors.

Gray Scale Image

Converts the image to gray scale.

Cropping (Pixels from
Top/Left of Image (0,0))

Define the cropped image in terms of Left, Right, Top and Bottom where these values are the number of pixels from the top left corner (0,0) of the image.

Note:
Image Transparency and Cropping are not supported in iNomads.

(The Image Options dialogue was added in PxPlus 2019.)

Position

Column

Starting column for the top left corner of the control - numeric expression. Format mask is ##0.00. Valid entries are 0 to 620.

Line

Starting line for the top left corner of the control - numeric expression. Format mask is ##0.00. Valid entries are 0 to 255.

(Support for increased Column and Line maximums was added in PxPlus 2021.)

Size

Width

Width of the control in number of columns - numeric expression. Format mask is ##0.00. Valid entries are 0 to 620.

Height

Height of the control in number of lines - numeric expression. Format mask is ##0.00. Valid entries are 0 to 255.

(Support for increased Width and Height maximums was added in PxPlus 2021.)

Attributes

Optional attributes for Tab Stop, Button on Right, Initially Disabled and Initially Hidden. See Attributes.

Button on Right

(Applicable only if the control does not contain a bitmap) Radio Button appears after the text.

Font/Color

Font Specification

Font
Size

Click the drop-down arrow for a list of selections.

Color

Foreground
Background

Click the Query button to access Color Selections. Valid formats for color selections include predefined system colors (e.g. Light Red), Custom (RGB codes), HTML Hex Color Codes, User Defined colors (e.g. Color17) and string Expressions.

Color

Foreground
Background

Click the Query button to access Color Selections. Valid formats for color selections include predefined system colors (e.g. Light Red), Custom (RGB codes), HTML Hex Color Codes, User Defined colors (e.g. Color17) and string Expressions.

(The Color Selections Query button and dialog were added in PxPlus 2020.)

Note:
If a background color has been assigned to a transparent button, the background color will be ignored.

(Transparency precedence for buttons with background colors was added in PxPlus 2019 Update 1.)

Attributes

Optional attributes for Bold, Italics, etc. See Attributes.

Alignment

Sets the text alignment on the button. Selections of Left Justify, Center and Right Justify are available when defining a Radio Button with both text and bitmap(s). See Display. When defining a Radio Button with text only, this defaults to Center, and the other two selections are not available.

Visual Class

Assign a visual class to the control.

Click the Visual Class Maintenance button to launch the Visual Classes Maintenance utility for creating or editing visual classes.

To assign Visual Classes to controls at the library level, see Visual Class Assignment.

Note:
Visual class names that begin with an "*" (asterisk) are pre-defined visual classes used by PVX Plus and may be subject to change without notice.

(The Visual Class Maintenance button was added in PxPlus 2019.)

iNomads Class

Assign an iNomads class to the control. The iNomads class contains class attribute references used when defining the control in the HTML code generated in iNomads. An iNomads class reference must start with an alpha character (A-Z or a-z), followed by any combination of A-Z, a-z, 0-9, underscore or dash. Multiple references may be entered, separated by a space.

For a list of pre-defined classes, see iNomads Classes.

Attributes

Attributes

Tab Stop

Adds the control to the tab order list. Allows use of the Tab key for moving to the control. Applies only to one Index Value.

Auto Tab Skip

Control is skipped when tabbing forward but is still accessible via Shift - Tab or the mouse.

Initially Disabled

Control region is grayed out and is not accessible to the user for input. The control is accessible programmatically.

Initially Hidden

Control is not displayed but is accessible programmatically.

Enable Scrolling

Allows the control to scroll in a resizable/scrollable dialogue box. See Panel Resizing.

Flat Button

Button shows no raised outline unless the mouse is over the button or the button is pressed.

Bitmap Button

Button has a bitmap whose width is divided into four images. Use this to custom design buttons with any color, style or shape by controlling the image that appears.

Hover Color

Text on the button is highlighted whenever the mouse is over the button area. The default color is controlled by the 'HC' system parameter that defaults to 'Light Blue'.

Underscore

Text on the button is underscored.

Flat - No Border

Button has no border and shows no raised outline unless the button is pressed.

Transparent

Button is transparent; i.e. the window contents behind the button show through. This style can be used to place buttons onto bitmaps.

Note:
Setting a background color is not compatible with transparency. If a background color is specified, it will be ignored.

Drop-List Button

Extra button with an arrow bitmap is attached to the right of the main button. When the arrow bitmap button is clicked, the associated popup menu is displayed.

Ignore Change Flag

Select this check box when you do not want the NOMADS CHANGE_FLG variable to be updated when the control value is changed.

Signal Only (No Focus)

PxPlus generates a CTL value but does not shift focus to the button automatically (Default) unless focus is explicitly passed.

(The Ignore Change Flag property was added in PxPlus 2017.)

User-Defined Tag Field

(Accessible via Index Value 1 Only)

For controls, data/tag field which can be used to pass information on such things as formatting, error messages or validation rules. Field contents are placed in a variable using the control name with a .TAG$ extension.

Value

Values

Index Value

Unique individual index. Integer, range from 1 to 127. Used in applications to identify which Radio Button the user selects.

Initially On

Sets Radio Button selection to the On state - a black dot appears in the circle.

Translate Value

Single character translation value representing the selection.

Logic

Default Program

Displays the name of the Default Program used in the Panel Header definition.

(The Default Program was added for display in PxPlus 2019.)

Post Create

(Accessible via Index Value 1 Only)

Logic to be processed after the control is drawn. Click the drop-down arrow for a list of selections. See Events Logic.

Click the Program Logic button beside the Perform or Call action to launch the default program editor, which is typically the *IT - Integrated Toolkit. To make Ed+ the default program editor, change the setting for the %NOMADS'Program_Editor property to Ed+.

(The ability to set Ed+ as the default program editor was added in PxPlus 2023.)

When Receiving Focus

(Accessible via Index Value 1 Only)

Logic to execute when the control receives focus. Click the drop-down arrow for a list of selections. See Events Logic.

Click the Program Logic button beside the Perform or Call action to launch the default program editor, which is typically the *IT - Integrated Toolkit. To make Ed+ the default program editor, change the setting for the %NOMADS'Program_Editor property to Ed+.

(The ability to set Ed+ as the default program editor was added in PxPlus 2023.)

When Radio Button Pressed

(Accessible via Index Value 1 Only)

Logic to be executed when focus leaves the control or the state of the control has changed. Click the drop-down arrow for a list of selections. See Events Logic.

Click the Program Logic button beside the Perform or Call action to launch the default program editor, which is typically the *IT - Integrated Toolkit. To make Ed+ the default program editor, change the setting for the %NOMADS'Program_Editor property to Ed+.

(The ability to set Ed+ as the default program editor was added in PxPlus 2023.)

User Aid

Help Reference

Help text to be invoked at run time by pressing Shift - F1 while focus is on a control.

Type

Select from External or Internal help types:

External

(Default) Standard Windows help system consisting of a help File Name (.html, .hlp, .doc, etc.) and an optional Keyword or Reference number (Fixed value or string Expression).

Internal

Application supplied message text (Fixed value, string Expression or Message Library Reference).

File Name

Name of the help file.

Keyword

Indicates that the text in the adjacent field is the index entry for the topic in the indicated help file.

Reference

Indicates that the adjacent field contains the reference number for a specific topic in the context sensitive help.

Popup

Select this check box to display the help topic as a popup rather than as an independent window.

Test

Tests the current help settings.

Floating Tip

Mouse pointer message for the control (Fixed value, string Expression or Message Library Reference).

You can customize the floating tip by adding a tip title, descriptive tip text and a hyperlink. These features enhance the visual display and functionality of the tip by providing users with much needed information at their fingertips. You can define either a Standard tip or an HTML tip that provides a simplified HTML Editor for customizing the tip text. To do this, click the button to the right of the Floating Tip multi-line input to invoke the Define Info Tip dialogue. See Defining an Info Tip.

Note:
The Floating Tip drop box and multi-line input cannot be changed once an HTML tip has been defined.

NOMADS Wiki Help

The floating tip text can be used when displaying the Wiki Help. Info tips, however, are not supported and will be ignored.

(Support for customizing Floating Tips was added in PxPlus 2016.)
(Support for the use of Floating Tip text in the Wiki Help was added in PxPlus 2023.)

Message Bar

Text to be displayed in the panel's status bar when focus is on the control (Fixed value, string Expression or Message Library Reference).

 

Security

Security restrictions. See Restricting Access for information on Object Security Definition.

Groups

Assign the control to a group. See Group Assignment.

Popup Menu

Associate a popup menu that will appear when you right-click the mouse over the selected control. See Popup Menu.

Notes

Add notes/comments for the control. Maximum 1024 characters. These notes also display in the Wiki Help documentation for the panel. See NOMADS Wiki Help.

(The Notes button was added in PxPlus 2023.)

See Also

RADIO_BUTTON Properties
RADIO_BUTTON Directive