]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/bitmapcombobox.tex
added new and improved wxFileCtrl implementation (patch 1763164)
[wxWidgets.git] / docs / latex / wx / bitmapcombobox.tex
1 \section{\class{wxBitmapComboBox}}\label{wxbitmapcombobox}
2
3 A combobox that displays bitmap in front of the list items.
4 It currently only allows using bitmaps of one size, and resizes itself
5 so 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
18 While wxBitmapComboBox contains the \helpref{wxComboBox}{wxcombobox}
19 API, but it might not actually be derived from that class. In fact,
20 if the platform does not have a native implementation, wxBitmapComboBox
21 will inherit from \helpref{wxOwnerDrawnComboBox}{wxownerdrawncombobox}.
22 You can determine if the implementation is generic by checking whether
23 wxGENERIC\_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
37 editor. On some platforms the control may appear very different when this
38 style is used.}
39 \twocolitem{\windowstyle{wxCB\_SORT}}{Sorts the entries in the list alphabetically.}
40 \twocolitem{\windowstyle{wxTE\_PROCESS\_ENTER}}{The control will generate
41 the event wxEVT\_COMMAND\_TEXT\_ENTER (otherwise pressing Enter key
42 is either processed internally by the control or used for navigation between
43 dialog controls). Windows only.}
44 \end{twocollist}
45
46 See 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,
53 when an item on the list is selected.}
54 \twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED event,
55 when the combobox text changes.}
56 \twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_ENTER event,
57 when <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
72 Default 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
84 Constructor, 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
97 appropriately.}
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
118 Destructor, 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
133 Creates the combobox for two-step construction. Derived classes
134 should call or replace this function. See \helpref{wxBitmapComboBox::wxBitmapComboBox}{wxbitmapcomboboxctor}\rtfsp
135 for 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
142 Adds 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
148 Adds the item to the end of the combo box, associating the given, typed or
149 untyped, client data pointer with the item.
150
151
152 \membersection{wxBitmapComboBox::GetBitmapSize}\label{wxbitmapcomboboxgetbitmapsize}
153
154 \constfunc{wxSize}{GetBitmapSize}{\void}
155
156 Returns 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
163 Returns 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
170 Inserts the item into the list before pos.
171 Not 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
177 Inserts the item into the list before pos, associating the given, typed or
178 untyped, client data pointer with the item.
179 Not 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
186 Sets the bitmap for the given item.
187