1\section{\class{wxBitmapComboBox}}\label{wxbitmapcombobox}
2
3A combobox that displays bitmap in front of the list items.
4It currently only allows using bitmaps of one size, and resizes itself
5so that a bitmap can be shown next to the text field.
6
7\wxheading{Derived from}
8
9\helpref{wxComboBox}{wxcombobox}\\
10\helpref{wxControlWithItems}{wxcontrolwithitems}\\
11\helpref{wxControl}{wxcontrol}\\
12\helpref{wxWindow}{wxwindow}\\
13\helpref{wxEvtHandler}{wxevthandler}\\
14\helpref{wxObject}{wxobject}
15
16\wxheading{Remarks}
17
18While wxBitmapComboBox contains the \helpref{wxComboBox}{wxcombobox}
19API, but it might not actually be derived from that class. In fact,
20if the platform does not have a native implementation, wxBitmapComboBox
21will inherit from \helpref{wxOwnerDrawnComboBox}{wxownerdrawncombobox}.
22You can determine if the implementation is generic by checking whether
23wxGENERIC\_BITMAPCOMBOBOX is defined.
24
25\wxheading{Include files}
26
27<wx/bmpcbox.h>
28
29\wxheading{Window styles}
30
31\begin{twocollist}\itemsep=0pt
32\twocolitem{\windowstyle{wxCB\_READONLY}}{Creates a combobox without a text
33editor. On some platforms the control may appear very different when this
34style is used.}
35\twocolitem{\windowstyle{wxCB\_SORT}}{Sorts the entries in the list alphabetically.}
36\twocolitem{\windowstyle{wxTE\_PROCESS\_ENTER}}{The control will generate
37the event wxEVT\_COMMAND\_TEXT\_ENTER (otherwise pressing Enter key
38is either processed internally by the control or used for navigation between
39dialog controls). Windows only.}
40\end{twocollist}
41
42See also \helpref{window styles overview}{windowstyles}.
43
44\wxheading{Event handling}
45
46\twocolwidtha{7cm}
47\begin{twocollist}\itemsep=0pt
48\twocolitem{{\bf EVT\_COMBOBOX(id, func)}}{Process a wxEVT\_COMMAND\_COMBOBOX\_SELECTED event,
49when an item on the list is selected.}
50\twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED event,
51when the combobox text changes.}
52\twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_ENTER event,
53when <RETURN> is pressed in the combobox.}
54\end{twocollist}
55
56\wxheading{See also}
57
58\helpref{wxComboBox}{wxcombobox}, \helpref{wxChoice}{wxchoice}, \helpref{wxOwnerDrawnComboBox}{wxownerdrawncombobox},
59\rtfsp\helpref{wxCommandEvent}{wxcommandevent}
60
61\latexignore{\rtfignore{\wxheading{Members}}}
62
63
64\membersection{wxBitmapComboBox::wxBitmapComboBox}\label{wxbitmapcomboboxctor}
65
66\func{}{wxBitmapComboBox}{\void}
67
68Default constructor.
69
70\func{}{wxBitmapComboBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
71\param{const wxString\& }{value = ``"}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
72\param{int}{ n = 0}, \param{const wxString }{choices[] = NULL},\rtfsp
73\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
74
75\func{}{wxBitmapComboBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
76\param{const wxString\& }{value}, \param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp
77\param{const wxArrayString\& }{choices},\rtfsp
78\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
79
80Constructor, creating and showing a combobox.
81
82\wxheading{Parameters}
83
84\docparam{parent}{Parent window. Must not be NULL.}
85
86\docparam{id}{Window identifier. A value of -1 indicates a default value.}
87
88\docparam{value}{Initial selection string. An empty string indicates no selection.}
89
90\docparam{pos}{Window position.}
91
92\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
93appropriately.}
94
95\docparam{n}{Number of strings with which to initialise the control.}
96
97\docparam{choices}{An array of strings with which to initialise the control.}
98
99\docparam{style}{Window style. See \helpref{wxBitmapComboBox}{wxbitmapcombobox}.}
100
101\docparam{validator}{Window validator.}
102
103\docparam{name}{Window name.}
104
105\wxheading{See also}
106
107\helpref{wxBitmapComboBox::Create}{wxbitmapcomboboxcreate}, \helpref{wxValidator}{wxvalidator}
108
109
110\membersection{wxBitmapComboBox::\destruct{wxBitmapComboBox}}\label{wxbitmapcomboboxdtor}
111
112\func{}{\destruct{wxBitmapComboBox}}{\void}
113
114Destructor, destroying the combobox.
115
116
117\membersection{wxBitmapComboBox::Create}\label{wxbitmapcomboboxcreate}
118
119\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
120\param{const wxString\& }{value = ``"}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
121\param{int}{ n}, \param{const wxString }{choices[]},\rtfsp
122\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
123
124\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
125\param{const wxString\& }{value}, \param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp
126\param{const wxArrayString\& }{choices},\rtfsp
127\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
128
129Creates the combobox for two-step construction. Derived classes
130should call or replace this function. See \helpref{wxBitmapComboBox::wxBitmapComboBox}{wxbitmapcomboboxctor}\rtfsp
131for further details.
132
133
134\membersection{wxBitmapComboBox::Append}\label{wxbitmapcomboboxappend}
135
136\func{int}{Append}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}}
137
138Adds the item to the end of the combo box.
139
140\func{int}{Append}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{void *}{clientData}}
141
142\func{int}{Append}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{wxClientData *}{clientData}}
143
144Adds the item to the end of the combo box, associating the given, typed or
145untyped, client data pointer with the item.
146
147
148\membersection{wxBitmapComboBox::GetBitmapSize}\label{wxbitmapcomboboxgetbitmapsize}
149
150\constfunc{wxSize}{GetBitmapSize}{\void}
151
152Returns size of bitmaps used in the list.
153
154
155\membersection{wxBitmapComboBox::GetItemBitmap}\label{wxbitmapcomboboxgetitembitmap}
156
157\constfunc{wxBitmap}{GetItemBitmap}{\param{unsigned int }{n}}
158
159Returns the bitmap of the item with the given index.
160
161
162\membersection{wxBitmapComboBox::Insert}\label{wxbitmapcomboboxinsert}
163
164\func{int}{Insert}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{unsigned int }{pos}}
165
166Inserts the item into the list before pos.
167Not valid for {\tt wxCB\_SORT} style, use Append instead.
168
169\func{int}{Insert}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{unsigned int }{pos}, \param{void *}{clientData}}
170
171\func{int}{Insert}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{unsigned int }{pos}, \param{wxClientData *}{clientData}}
172
173Inserts the item into the list before pos, associating the given, typed or
174untyped, client data pointer with the item.
175Not valid for {\tt wxCB\_SORT} style, use Append instead.
176
177
178\membersection{wxBitmapComboBox::SetItemBitmap}\label{wxbitmapcomboboxsetitembitmap}
179
180\func{void}{SetItemBitmap}{\param{unsigned int }{n}, \param{const wxBitmap\& }{bitmap}}
181
182Sets the bitmap for the given item.
183
184