Panel: options

Syntax

{<name>:} options {<strings>}

Description

Option menu sub-panel. A sub-panel with a pulldown menu of selectable options. The currently selected option is shown in the sub-panel. Options can be text or image.

Membership

Parameters

Switches

Callbacks

Called when the selected option changes.

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

Notes

Option menus within other windows cannot have a user-defined position or justification.

On Unix systems, the size of an options menu is determined by the size of the largest option within the menu and cannot be changed. Any subsequent change to menu option text will automatically resize the panel.

On Windows systems, the width of a text menu is determined by the value of the -c switch, a width provided by the -dim switch, or the length of the longest text option. The size can be changed subsequently only be resizing the panel via the panel.width attribute.

Examples

Create a panel window containing an options menu of text items in a specified font.

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

Create a similar panel window to the previous example but with color change and an initial value.

window w = wpanel {
    dev: options -bc=blue,-tc=white,-d=3,\ 
        <'Dat','CD','Diskette','QIC','Exabyte'>
}

Create a panel window containing an options menu with image options. The options have associated text values. The background color of the images is made the same as that of the menu. We assume that states.ras is a Fire image file containing four cameos.

window w = wpanel {
    state: options -cr='states.ras',-bc=no_change,\ 
        -t=<'NY','FLA','LA','COL'>
}

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

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