]>
git.saurik.com Git - wxWidgets.git/blob - interface/bmpcbox.h
5d8e53ba26f5e75f82c29109f93c828593ed6340
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxBitmapComboBox class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxBitmapComboBox
13 A combobox that displays bitmap in front of the list items.
14 It currently only allows using bitmaps of one size, and resizes itself
15 so that a bitmap can be shown next to the text field.
18 @style{wxCB_READONLY}:
19 Creates a combobox without a text editor. On some platforms the
20 control may appear very different when this style is used.
22 Sorts the entries in the list alphabetically.
23 @style{wxTE_PROCESS_ENTER}:
24 The control will generate the event wxEVT_COMMAND_TEXT_ENTER
25 (otherwise pressing Enter key is either processed internally by the
26 control or used for navigation between dialog controls). Windows
31 @event{EVT_COMBOBOX(id, func)}:
32 Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on
34 @event{EVT_TEXT(id, func)}:
35 Process a wxEVT_COMMAND_TEXT_UPDATED event, when the combobox text
37 @event{EVT_TEXT_ENTER(id, func)}:
38 Process a wxEVT_COMMAND_TEXT_ENTER event, when RETURN is pressed in
44 @appearance{bitmapcombobox.png}
47 wxComboBox, wxChoice, wxOwnerDrawnComboBox, wxCommandEvent
49 class wxBitmapComboBox
: public wxComboBox
54 Constructor, creating and showing a combobox.
57 Parent window. Must not be @NULL.
59 Window identifier. The value wxID_ANY indicates a default value.
61 Initial selection string. An empty string indicates no selection.
65 Window size. If wxDefaultSize is specified then the window is
69 Number of strings with which to initialise the control.
71 An array of strings with which to initialise the control.
73 Window style. See wxBitmapComboBox.
79 @see Create(), wxValidator
82 wxBitmapComboBox(wxWindow
* parent
, wxWindowID id
,
83 const wxString
& value
= "",
84 const wxPoint
& pos
= wxDefaultPosition
,
85 const wxSize
& size
= wxDefaultSize
,
87 const wxString choices
[] = NULL
,
89 const wxValidator
& validator
= wxDefaultValidator
,
90 const wxString
& name
= "comboBox");
91 wxBitmapComboBox(wxWindow
* parent
, wxWindowID id
,
92 const wxString
& value
,
95 const wxArrayString
& choices
,
97 const wxValidator
& validator
= wxDefaultValidator
,
98 const wxString
& name
= "comboBox");
102 Destructor, destroying the combobox.
108 Adds the item to the end of the combo box, associating the given, typed or
109 untyped, client data pointer with the item.
111 int Append(const wxString
& item
,
112 const wxBitmap
& bitmap
= wxNullBitmap
);
113 int Append(const wxString
& item
, const wxBitmap
& bitmap
,
115 int Append(const wxString
& item
, const wxBitmap
& bitmap
,
116 wxClientData
* clientData
);
121 Creates the combobox for two-step construction. Derived classes
122 should call or replace this function. See wxBitmapComboBox()
125 bool Create(wxWindow
* parent
, wxWindowID id
,
126 const wxString
& value
= "",
127 const wxPoint
& pos
= wxDefaultPosition
,
128 const wxSize
& size
= wxDefaultSize
,
129 int n
, const wxString choices
[],
131 const wxValidator
& validator
= wxDefaultValidator
,
132 const wxString
& name
= "comboBox");
133 bool Create(wxWindow
* parent
, wxWindowID id
,
134 const wxString
& value
,
137 const wxArrayString
& choices
,
139 const wxValidator
& validator
= wxDefaultValidator
,
140 const wxString
& name
= "comboBox");
144 Returns size of bitmaps used in the list.
146 wxSize
GetBitmapSize();
149 Returns the bitmap of the item with the given index.
151 wxBitmap
GetItemBitmap(unsigned int n
);
155 Inserts the item into the list before pos, associating the given, typed or
156 untyped, client data pointer with the item.
157 Not valid for @c wxCB_SORT style, use Append instead.
159 int Insert(const wxString
& item
, const wxBitmap
& bitmap
,
161 int Insert(const wxString
& item
, const wxBitmap
& bitmap
,
164 int Insert(const wxString
& item
, const wxBitmap
& bitmap
,
166 wxClientData
* clientData
);
170 Sets the bitmap for the given item.
172 void SetItemBitmap(unsigned int n
, const wxBitmap
& bitmap
);