Panel: radio_box

Syntax

{<name>:} radio_box {<strings>}

Description

Radio_box sub-panel. A layout of options each with an indicator button. One option may be selected at a time. Options can be text or image.

Membership

Parameters

Switches

Callbacks

Called when the selected option changes.

<panel>.exec(<window>,<panel>{,<row>})

Notes

Switches -j, -pj, -x and -y apply only to radio boxes within a panel window. Radio boxes within other windows cannot have a user-defined position or justification.

Examples

Create a panel window containing a radio-box of text items in a specified font.

window w = wpanel {
    dev: radio_box -fo=big_xfont,\ 
        <'Dat','CD','Diskette','QIC','Exabyte'>
}

Create a similar panel window to the previous example but with the radio-box framed, a different text color, no initial value, "quiet" mode, and a "set" color of red.

window w = wpanel {
    dev: radio_box -tc=white,-d=0,-q,-set=red,\ 
        <'Dat','CD','Diskette','QIC','Exabyte'>
}

Create a panel window containing a radio-box with image options. The options have associated text values. The background color of the images is made the same as that of the radio-box. The options are laid out horizontally. states.ras is assumed to be a image file containing four cameos. Individual option tooltips are supplied.

window w = wpanel {
    state: radio_box -cr='states.ras',-bc=no_change,\ 
        -h,-t=<'NY','FLA','LA','COL'>,\
        -tt='New York|Florida|Louisiana|Colorado'
}

Create a similar panel window to the previous example but with the images named individually to illustrate multiple image definition.

window w = wpanel {
    state: radio_box \
        -cr=<'newyork.gif','florida.gif',\ 
          'louisiana.gif','colorado.gif'>,\ 
        -bc=no_change,-h,-t=<'NY','FLA','LA','COL'>
}