]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/bitmapcombobox.tex
no changes, just come cleanup and more comments
[wxWidgets.git] / docs / latex / wx / bitmapcombobox.tex
... / ...
CommitLineData
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{Library}
30
31\helpref{wxAdv}{librarieslist}
32
33\wxheading{Window styles}
34
35\begin{twocollist}\itemsep=0pt
36\twocolitem{\windowstyle{wxCB\_READONLY}}{Creates a combobox without a text
37editor. On some platforms the control may appear very different when this
38style is used.}
39\twocolitem{\windowstyle{wxCB\_SORT}}{Sorts the entries in the list alphabetically.}
40\twocolitem{\windowstyle{wxTE\_PROCESS\_ENTER}}{The control will generate
41the event wxEVT\_COMMAND\_TEXT\_ENTER (otherwise pressing Enter key
42is either processed internally by the control or used for navigation between
43dialog controls). Windows only.}
44\end{twocollist}
45
46See also \helpref{window styles overview}{windowstyles}.
47
48\wxheading{Event handling}
49
50\twocolwidtha{7cm}
51\begin{twocollist}\itemsep=0pt
52\twocolitem{{\bf EVT\_COMBOBOX(id, func)}}{Process a wxEVT\_COMMAND\_COMBOBOX\_SELECTED event,
53when an item on the list is selected.}
54\twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED event,
55when the combobox text changes.}
56\twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_ENTER event,
57when <RETURN> is pressed in the combobox.}
58\end{twocollist}
59
60\wxheading{See also}
61
62\helpref{wxComboBox}{wxcombobox}, \helpref{wxChoice}{wxchoice}, \helpref{wxOwnerDrawnComboBox}{wxownerdrawncombobox},
63\rtfsp\helpref{wxCommandEvent}{wxcommandevent}
64
65\latexignore{\rtfignore{\wxheading{Members}}}
66
67
68\membersection{wxBitmapComboBox::wxBitmapComboBox}\label{wxbitmapcomboboxctor}
69
70\func{}{wxBitmapComboBox}{\void}
71
72Default constructor.
73
74\func{}{wxBitmapComboBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
75\param{const wxString\& }{value = ``"}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
76\param{int}{ n = 0}, \param{const wxString }{choices[] = NULL},\rtfsp
77\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
78
79\func{}{wxBitmapComboBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
80\param{const wxString\& }{value}, \param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp
81\param{const wxArrayString\& }{choices},\rtfsp
82\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
83
84Constructor, creating and showing a combobox.
85
86\wxheading{Parameters}
87
88\docparam{parent}{Parent window. Must not be NULL.}
89
90\docparam{id}{Window identifier. A value of -1 indicates a default value.}
91
92\docparam{value}{Initial selection string. An empty string indicates no selection.}
93
94\docparam{pos}{Window position.}
95
96\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
97appropriately.}
98
99\docparam{n}{Number of strings with which to initialise the control.}
100
101\docparam{choices}{An array of strings with which to initialise the control.}
102
103\docparam{style}{Window style. See \helpref{wxBitmapComboBox}{wxbitmapcombobox}.}
104
105\docparam{validator}{Window validator.}
106
107\docparam{name}{Window name.}
108
109\wxheading{See also}
110
111\helpref{wxBitmapComboBox::Create}{wxbitmapcomboboxcreate}, \helpref{wxValidator}{wxvalidator}
112
113
114\membersection{wxBitmapComboBox::\destruct{wxBitmapComboBox}}\label{wxbitmapcomboboxdtor}
115
116\func{}{\destruct{wxBitmapComboBox}}{\void}
117
118Destructor, destroying the combobox.
119
120
121\membersection{wxBitmapComboBox::Create}\label{wxbitmapcomboboxcreate}
122
123\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
124\param{const wxString\& }{value = ``"}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
125\param{int}{ n}, \param{const wxString }{choices[]},\rtfsp
126\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
127
128\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
129\param{const wxString\& }{value}, \param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp
130\param{const wxArrayString\& }{choices},\rtfsp
131\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
132
133Creates the combobox for two-step construction. Derived classes
134should call or replace this function. See \helpref{wxBitmapComboBox::wxBitmapComboBox}{wxbitmapcomboboxctor}\rtfsp
135for further details.
136
137
138\membersection{wxBitmapComboBox::Append}\label{wxbitmapcomboboxappend}
139
140\func{int}{Append}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}}
141
142Adds the item to the end of the combo box.
143
144\func{int}{Append}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{void *}{clientData}}
145
146\func{int}{Append}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{wxClientData *}{clientData}}
147
148Adds the item to the end of the combo box, associating the given, typed or
149untyped, client data pointer with the item.
150
151
152\membersection{wxBitmapComboBox::GetBitmapSize}\label{wxbitmapcomboboxgetbitmapsize}
153
154\constfunc{wxSize}{GetBitmapSize}{\void}
155
156Returns size of bitmaps used in the list.
157
158
159\membersection{wxBitmapComboBox::GetItemBitmap}\label{wxbitmapcomboboxgetitembitmap}
160
161\constfunc{wxBitmap}{GetItemBitmap}{\param{unsigned int }{n}}
162
163Returns the bitmap of the item with the given index.
164
165
166\membersection{wxBitmapComboBox::Insert}\label{wxbitmapcomboboxinsert}
167
168\func{int}{Insert}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{unsigned int }{pos}}
169
170Inserts the item into the list before pos.
171Not valid for {\tt wxCB\_SORT} style, use Append instead.
172
173\func{int}{Insert}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{unsigned int }{pos}, \param{void *}{clientData}}
174
175\func{int}{Insert}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{unsigned int }{pos}, \param{wxClientData *}{clientData}}
176
177Inserts the item into the list before pos, associating the given, typed or
178untyped, client data pointer with the item.
179Not valid for {\tt wxCB\_SORT} style, use Append instead.
180
181
182\membersection{wxBitmapComboBox::SetItemBitmap}\label{wxbitmapcomboboxsetitembitmap}
183
184\func{void}{SetItemBitmap}{\param{unsigned int }{n}, \param{const wxBitmap\& }{bitmap}}
185
186Sets the bitmap for the given item.
187