Panel: combo_box

Syntax

{<name>:} combo_box { <strings> }

Description

Combination sub-panel comprising a text input box and pulldown menu with selectable options.

Membership

Parameters

Switches

Callbacks

Called as the combo box is about to lose the keyboard focus. If a non-empty after callback exists for the panel, the focus remains with the panel until directed elsewhere by a focus command.

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

Called as the combo box receives the keyboard focus.

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

Called when an option is picked from the pulldown menu, or when <Return> is hit in the text box.

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

Notes

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

Examples

Create a panel window containing a labeled combo-box of specified font and character width.

window w = wpanel {
    row {
        label 'Fruit:'
        fruit: combo_box -fo=big_xfont,-c=10,\ 
            <'Apple','Jack','Melon','Orange','Ugly'>
    }
}

Create a panel window containing a labeled combo-box of specified colors. It is given an initial value.

window w = wpanel {
    row {
        label 'City:'
        city: combo_box -tc=red,-bc=yellow,-d='Dallas',\ 
            <'Delhi','Kinshasa','Lima','Seattle','Seoul'>
    }
}