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. |
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. |
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-2012 by Cogent Real-Time Systems, Inc. All rights reserved.