PtComboBox

PtComboBox -- A text field and a list of choices.

Synopsis

class PtComboBox PtContainer
{
    cbox_button_border_width;        // short  (Pt_ARG_CBOX_BUTTON_BORDER_WIDTH)    
    cbox_button_bot_border_color;    // color  (Pt_ARG_CBOX_BUTTON_BOT_BORDER_COLOR)    
    cbox_button_color;               // color  (Pt_ARG_CBOX_BUTTON_COLOR)    
    cbox_button_top_border_color;    // color  (Pt_ARG_CBOX_BUTTON_TOP_BORDER_COLOR)    
    cbox_button_width;               // unsigned short  (Pt_ARG_CBOX_BUTTON_WIDTH)    
    cbox_flags;                      // flag  (Pt_ARG_CBOX_FLAGS)    
    cbox_max_visible_count;          // unsigned short  (Pt_ARG_CBOX_MAX_VISIBLE_COUNT)    
    cbox_sel_item;                   // unsigned short  (Pt_ARG_CBOX_SEL_ITEM)    
}
		

Base Classes

PtWidget <-- PtBasic <-- PtContainer <-- PtComboBox

Description

This widget combines a PtText widget with a PtList widget, and allows you to either enter a choice, or choose it from the list. The list can be either static or dropping, and you choose items by clicking on them with the mouse, or dragging down and releasing the mouse button. The list is scrollable if the number of items exceeds a specifiable maximum.

The first five instance variables for this widget are self-explanatory. The button they refer to is the drop button that activates the drop list.

Note

For detailed information, please refer to PtComboBox in the Photon documentation.

Instance Variables

cbox_button_border_width

A number of pixels specifying the border width. Default is 2.

cbox_button_bot_border_color

A number specifying the color of the drop button's bottom border. Default is 0xffffff (white).

cbox_button_color

A number specifying the color of the drop button. Default is 0xc0c0c0 (grey).

cbox_button_top_border_color

A number specifying the color of the drop button's top border. Default is 0x606060 (dark grey).

cbox_button_width

A number of pixels specifying the width of the button. Default is 17.

cbox_flags

Flags that control the behavior of the widget.

This instance variable may be a combination of zero or more of the following flags:

cbox_max_visible_count

An integer specifying the maximum number of list items to display. If the number exceeds this maximum, a scrollbar will appear. If it is set to 0 (the default), all items will be displayed.

cbox_sel_item

An index into the items variable that indicates the selected list item.

Callbacks

The following callbacks are associated with this widget:

CallbackDescription
Pt_CB_CBOX_ACTIVATEThis callback is generated when the combo box list is opened.
Pt_CB_CBOX_CLOSEThis callback is generated when the combo box list is closed.

Note

Since this class combines PtList and PtText, it inherits callbacks from both of those classes.

Associated Classes

PtList, PtText

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.