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
}
29 \wxheading{Window styles
}
31 \begin{twocollist
}\itemsep=
0pt
32 \twocolitem{\windowstyle{wxCB
\_READONLY}}{Creates a combobox without a text
33 editor. On some platforms the control may appear very different when this
35 \twocolitem{\windowstyle{wxCB
\_SORT}}{Sorts the entries in the list alphabetically.
}
36 \twocolitem{\windowstyle{wxTE
\_PROCESS\_ENTER}}{The control will generate
37 the event wxEVT
\_COMMAND\_TEXT\_ENTER (otherwise pressing Enter key
38 is either processed internally by the control or used for navigation between
39 dialog controls). Windows only.
}
42 See also
\helpref{window styles overview
}{windowstyles
}.
44 \wxheading{Event handling
}
47 \begin{twocollist
}\itemsep=
0pt
48 \twocolitem{{\bf EVT
\_COMBOBOX(id, func)
}}{Process a wxEVT
\_COMMAND\_COMBOBOX\_SELECTED event,
49 when an item on the list is selected.
}
50 \twocolitem{{\bf EVT
\_TEXT(id, func)
}}{Process a wxEVT
\_COMMAND\_TEXT\_UPDATED event,
51 when the combobox text changes.
}
52 \twocolitem{{\bf EVT
\_TEXT\_ENTER(id, func)
}}{Process a wxEVT
\_COMMAND\_TEXT\_ENTER event,
53 when <RETURN> is pressed in the combobox.
}
58 \helpref{wxComboBox
}{wxcombobox
},
\helpref{wxChoice
}{wxchoice
},
\helpref{wxOwnerDrawnComboBox
}{wxownerdrawncombobox
},
59 \rtfsp\helpref{wxCommandEvent
}{wxcommandevent
}
61 \latexignore{\rtfignore{\wxheading{Members
}}}
64 \membersection{wxBitmapComboBox::wxBitmapComboBox
}\label{wxbitmapcomboboxctor
}
66 \func{}{wxBitmapComboBox
}{\void}
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"
}}
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"
}}
80 Constructor, creating and showing a combobox.
82 \wxheading{Parameters
}
84 \docparam{parent
}{Parent window. Must not be NULL.
}
86 \docparam{id
}{Window identifier. A value of -
1 indicates a default value.
}
88 \docparam{value
}{Initial selection string. An empty string indicates no selection.
}
90 \docparam{pos
}{Window position.
}
92 \docparam{size
}{Window size. If the default size (-
1, -
1) is specified then the window is sized
95 \docparam{n
}{Number of strings with which to initialise the control.
}
97 \docparam{choices
}{An array of strings with which to initialise the control.
}
99 \docparam{style
}{Window style. See
\helpref{wxBitmapComboBox
}{wxbitmapcombobox
}.
}
101 \docparam{validator
}{Window validator.
}
103 \docparam{name
}{Window name.
}
107 \helpref{wxBitmapComboBox::Create
}{wxbitmapcomboboxcreate
},
\helpref{wxValidator
}{wxvalidator
}
110 \membersection{wxBitmapComboBox::
\destruct{wxBitmapComboBox
}}\label{wxbitmapcomboboxdtor
}
112 \func{}{\destruct{wxBitmapComboBox
}}{\void}
114 Destructor, destroying the combobox.
117 \membersection{wxBitmapComboBox::Create
}\label{wxbitmapcomboboxcreate
}
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"
}}
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"
}}
129 Creates the combobox for two-step construction. Derived classes
130 should call or replace this function. See
\helpref{wxBitmapComboBox::wxBitmapComboBox
}{wxbitmapcomboboxctor
}\rtfsp
134 \membersection{wxBitmapComboBox::Append
}\label{wxbitmapcomboboxappend
}
136 \func{int
}{Append
}{\param{const wxString\&
}{ item
},
\param{const wxBitmap\&
}{bitmap = wxNullBitmap
}}
138 Adds the item to the end of the combo box.
140 \func{int
}{Append
}{\param{const wxString\&
}{ item
},
\param{const wxBitmap\&
}{bitmap
},
\param{void *
}{clientData
}}
142 \func{int
}{Append
}{\param{const wxString\&
}{ item
},
\param{const wxBitmap\&
}{bitmap
},
\param{wxClientData *
}{clientData
}}
144 Adds the item to the end of the combo box, associating the given, typed or
145 untyped, client data pointer with the item.
148 \membersection{wxBitmapComboBox::GetBitmapSize
}\label{wxbitmapcomboboxgetbitmapsize
}
150 \constfunc{wxSize
}{GetBitmapSize
}{\void}
152 Returns size of bitmaps used in the list.
155 \membersection{wxBitmapComboBox::GetItemBitmap
}\label{wxbitmapcomboboxgetitembitmap
}
157 \constfunc{wxBitmap
}{GetItemBitmap
}{\param{unsigned int
}{n
}}
159 Returns the bitmap of the item with the given index.
162 \membersection{wxBitmapComboBox::Insert
}\label{wxbitmapcomboboxinsert
}
164 \func{int
}{Insert
}{\param{const wxString\&
}{ item
},
\param{const wxBitmap\&
}{bitmap
},
\param{unsigned int
}{pos
}}
166 Inserts the item into the list before pos.
167 Not valid for
{\tt wxCB
\_SORT} style, use Append instead.
169 \func{int
}{Insert
}{\param{const wxString\&
}{ item
},
\param{const wxBitmap\&
}{bitmap
},
\param{unsigned int
}{pos
},
\param{void *
}{clientData
}}
171 \func{int
}{Insert
}{\param{const wxString\&
}{ item
},
\param{const wxBitmap\&
}{bitmap
},
\param{unsigned int
}{pos
},
\param{wxClientData *
}{clientData
}}
173 Inserts the item into the list before pos, associating the given, typed or
174 untyped, client data pointer with the item.
175 Not valid for
{\tt wxCB
\_SORT} style, use Append instead.
178 \membersection{wxBitmapComboBox::SetItemBitmap
}\label{wxbitmapcomboboxsetitembitmap
}
180 \func{void
}{SetItemBitmap
}{\param{unsigned int
}{n
},
\param{const wxBitmap\&
}{bitmap
}}
182 Sets the bitmap for the given item.