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) }
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.
For detailed information, please refer to PtComboBox in the Photon documentation. |
A number of pixels specifying the border width. Default is 2.
A number specifying the color of the drop button's bottom border. Default is 0xffffff (white).
A number specifying the color of the drop button. Default is 0xc0c0c0 (grey).
A number specifying the color of the drop button's top border. Default is 0x606060 (dark grey).
A number of pixels specifying the width of the button. Default is 17.
Flags that control the behavior of the widget.
This instance variable may be a combination of zero or more of the following flags:
Constant | Description |
---|---|
Pt_COMBOBOX_STATIC | Changes the field from drop (the default) to static, and removes the drop button. |
Pt_COMBOBOX_TOP | Changes the default location of a drop field from the bottom to the top of the text field. |
Pt_COMBOBOX_MAX_WIDTH | Maximizes the width of the box to the size of the longest item. |
Pt_COMBOBOX_OPEN | When set (1), the list is open. |
Pt_COMBOBOX_ON_BOTTOM | Internal informational bit. |
Pt_COMBOBOX_EXTENTING | Internal informational bit. |
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.
An index into the items variable that indicates the selected list item.
The following callbacks are associated with this widget:
Callback | Description |
---|---|
Pt_CB_CBOX_ACTIVATE | This callback is generated when the combo box list is opened. |
Pt_CB_CBOX_CLOSE | This callback is generated when the combo box list is closed. |
Since this class combines PtList and PtText, it inherits callbacks from both of those classes. |
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.