All Manuals > CAPI User Guide and Reference Manual > 5 Choices - panes with items

NextPrevUpTopContentsIndex

5.6 Option panes

Option panes, created with the option-pane class, display the current selection from a single-selection list. When the user clicks on the option pane, the list appears and the user can make another selection from it. Once the selection is made, it is displayed in the option pane. In contrast to text-input-choice, the user cannot edit the selection.

The appearance of the option-pane list varies between platforms: a drop-down list box on Microsoft Windows; a combo box on GTK+ or Motif, and a popup list on Cocoa.

Here is an example option pane, which shows the choice of one of five numbers. The initial selection is controlled with :selected-item.

(contain
 (make-instance   
  'option-pane
  :items '(1 2 3 4 5)
  :selected-item 3
  :title "One of Five:")) 

Figure 5.8 An option pane

5.6.1 Option panes with images

You can add images to option pane items. Supply the :image-function initarg when creating the option-pane, as illustrated in:

(example-edit-file "capi/choice/option-pane-with-images")

CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015

NextPrevUpTopContentsIndex