1 \section{\class{wxBitmapComboBox
}}\label{wxbitmapcombobox
}
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.
7 \wxheading{Derived from
}
9 \helpref{wxComboBox
}{wxcombobox
}\\
10 \helpref{wxControlWithItems
}{wxcontrolwithitems
}\\
11 \helpref{wxControl
}{wxcontrol
}\\
12 \helpref{wxWindow
}{wxwindow
}\\
13 \helpref{wxEvtHandler
}{wxevthandler
}\\
14 \helpref{wxObject
}{wxobject
}
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.
25 \wxheading{Include files
}
31 \helpref{wxAdv
}{librarieslist
}
33 \wxheading{Window styles
}
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
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.
}
46 See also
\helpref{window styles overview
}{windowstyles
}.
48 \wxheading{Event handling
}
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.
}
62 \helpref{wxComboBox
}{wxcombobox
},
\helpref{wxChoice
}{wxchoice
},
\helpref{wxOwnerDrawnComboBox
}{wxownerdrawncombobox
},
63 \rtfsp\helpref{wxCommandEvent
}{wxcommandevent
}
65 \latexignore{\rtfignore{\wxheading{Members
}}}
68 \membersection{wxBitmapComboBox::wxBitmapComboBox
}\label{wxbitmapcomboboxctor
}
70 \func{}{wxBitmapComboBox
}{\void}
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"
}}
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"
}}
84 Constructor, creating and showing a combobox.
86 \wxheading{Parameters
}
88 \docparam{parent
}{Parent window. Must not be NULL.
}
90 \docparam{id
}{Window identifier. A value of -
1 indicates a default value.
}
92 \docparam{value
}{Initial selection string. An empty string indicates no selection.
}
94 \docparam{pos
}{Window position.
}
96 \docparam{size
}{Window size. If the default size (-
1, -
1) is specified then the window is sized
99 \docparam{n
}{Number of strings with which to initialise the control.
}
101 \docparam{choices
}{An array of strings with which to initialise the control.
}
103 \docparam{style
}{Window style. See
\helpref{wxBitmapComboBox
}{wxbitmapcombobox
}.
}
105 \docparam{validator
}{Window validator.
}
107 \docparam{name
}{Window name.
}
111 \helpref{wxBitmapComboBox::Create
}{wxbitmapcomboboxcreate
},
\helpref{wxValidator
}{wxvalidator
}
114 \membersection{wxBitmapComboBox::
\destruct{wxBitmapComboBox
}}\label{wxbitmapcomboboxdtor
}
116 \func{}{\destruct{wxBitmapComboBox
}}{\void}
118 Destructor, destroying the combobox.
121 \membersection{wxBitmapComboBox::Create
}\label{wxbitmapcomboboxcreate
}
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"
}}
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"
}}
133 Creates the combobox for two-step construction. Derived classes
134 should call or replace this function. See
\helpref{wxBitmapComboBox::wxBitmapComboBox
}{wxbitmapcomboboxctor
}\rtfsp
138 \membersection{wxBitmapComboBox::Append
}\label{wxbitmapcomboboxappend
}
140 \func{int
}{Append
}{\param{const wxString\&
}{ item
},
\param{const wxBitmap\&
}{bitmap = wxNullBitmap
}}
142 Adds the item to the end of the combo box.
144 \func{int
}{Append
}{\param{const wxString\&
}{ item
},
\param{const wxBitmap\&
}{bitmap
},
\param{void *
}{clientData
}}
146 \func{int
}{Append
}{\param{const wxString\&
}{ item
},
\param{const wxBitmap\&
}{bitmap
},
\param{wxClientData *
}{clientData
}}
148 Adds the item to the end of the combo box, associating the given, typed or
149 untyped, client data pointer with the item.
152 \membersection{wxBitmapComboBox::GetBitmapSize
}\label{wxbitmapcomboboxgetbitmapsize
}
154 \constfunc{wxSize
}{GetBitmapSize
}{\void}
156 Returns size of bitmaps used in the list.
159 \membersection{wxBitmapComboBox::GetItemBitmap
}\label{wxbitmapcomboboxgetitembitmap
}
161 \constfunc{wxBitmap
}{GetItemBitmap
}{\param{unsigned int
}{n
}}
163 Returns the bitmap of the item with the given index.
166 \membersection{wxBitmapComboBox::Insert
}\label{wxbitmapcomboboxinsert
}
168 \func{int
}{Insert
}{\param{const wxString\&
}{ item
},
\param{const wxBitmap\&
}{bitmap
},
\param{unsigned int
}{pos
}}
170 Inserts the item into the list before pos.
171 Not valid for
{\tt wxCB
\_SORT} style, use Append instead.
173 \func{int
}{Insert
}{\param{const wxString\&
}{ item
},
\param{const wxBitmap\&
}{bitmap
},
\param{unsigned int
}{pos
},
\param{void *
}{clientData
}}
175 \func{int
}{Insert
}{\param{const wxString\&
}{ item
},
\param{const wxBitmap\&
}{bitmap
},
\param{unsigned int
}{pos
},
\param{wxClientData *
}{clientData
}}
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.
182 \membersection{wxBitmapComboBox::SetItemBitmap
}\label{wxbitmapcomboboxsetitembitmap
}
184 \func{void
}{SetItemBitmap
}{\param{unsigned int
}{n
},
\param{const wxBitmap\&
}{bitmap
}}
186 Sets the bitmap for the given item.