Panel: check_button

Syntax

{<name>:} check_button {<string>}

Description

Toggle-button sub-panel, text or image.

Membership

Parameters

Switches

For text check buttons, the background color of the parent window is used and cannot be changed.

Callbacks

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

Called on a change of toggle state using mouse button 1:

Notes

Switches -j, -pj, -x and -y apply only to check buttons within a panel window. Check buttons within other windows and menupanes cannot have a user-defined position or justification.

Examples

Create a panel window containing two text check buttons in an italic font.

window w = wpanel {
    sof: check_button 'Send Output to File',-fo=xitalic
    sot: check_button 'Send Output to Printer',-fo=xitalic
}

Create a panel window containing three text buttons one of which is initially set, using different colored text in "quiet" mode. Commit a neatness by making them all left-justified.

window w = wpanel {
    b: check_button 'Add Border',-tc=white,-q,-j='L'
    s: check_button 'Auto-Size',-tc=red,-v=1,-q,-j='L'
    g: check_button 'Add Grid',-tc=yellow,-q,-j='L'
}

Create a panel window containing two framed single image check buttons with associated "return text".

window w = wpanel {
    m: check_button -cr='modem.xpm',-th=2,\ 
        -t=<'Inactive','Active'>
    p: check_button -cr='printer.xpm',-th=2,\ 
        -t=<'Inactive','Active'>
}