1 /////////////////////////////////////////////////////////////////////////////
2 // Program: wxWidgets Widgets Sample
4 // Purpose: Part of the widgets sample showing wxComboBox
5 // Author: Vadim Zeitlin
8 // Copyright: (c) 2001 Vadim Zeitlin
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 // for compilers that support precompilation, includes "wx/wx.h".
21 #include "wx/wxprec.h"
29 // for all others, include the necessary headers
33 #include "wx/bitmap.h"
34 #include "wx/button.h"
35 #include "wx/checkbox.h"
36 #include "wx/combobox.h"
37 #include "wx/radiobox.h"
38 #include "wx/statbox.h"
39 #include "wx/textctrl.h"
44 #include "itemcontainer.h"
46 #include "icons/combobox.xpm"
48 // ----------------------------------------------------------------------------
50 // ----------------------------------------------------------------------------
55 ComboPage_Reset
= wxID_HIGHEST
,
60 ComboPage_InsertionPointText
,
66 ComboPage_SetFirstText
,
76 ComboPage_SetValueText
,
78 ComboPage_ContainerTests
81 // kinds of comboboxes
89 // ----------------------------------------------------------------------------
90 // ComboboxWidgetsPage
91 // ----------------------------------------------------------------------------
93 class ComboboxWidgetsPage
: public ItemContainerWidgetsPage
96 ComboboxWidgetsPage(WidgetsBookCtrl
*book
, wxImageList
*imaglist
);
98 virtual wxControl
*GetWidget() const { return m_combobox
; }
99 virtual wxTextEntryBase
*GetTextEntry() const { return m_combobox
; }
100 virtual wxItemContainer
* GetContainer() const { return m_combobox
; }
101 virtual void RecreateWidget() { CreateCombo(); }
103 // lazy creation of the content
104 virtual void CreateContent();
108 void OnButtonReset(wxCommandEvent
& event
);
109 void OnButtonPopup(wxCommandEvent
&) { m_combobox
->Popup(); }
110 void OnButtonDismiss(wxCommandEvent
&) { m_combobox
->Dismiss(); }
111 void OnButtonChange(wxCommandEvent
& event
);
112 void OnButtonDelete(wxCommandEvent
& event
);
113 void OnButtonDeleteSel(wxCommandEvent
& event
);
114 void OnButtonClear(wxCommandEvent
& event
);
115 void OnButtonInsert(wxCommandEvent
&event
);
116 void OnButtonAdd(wxCommandEvent
& event
);
117 void OnButtonSetFirst(wxCommandEvent
& event
);
118 void OnButtonAddSeveral(wxCommandEvent
& event
);
119 void OnButtonAddMany(wxCommandEvent
& event
);
120 void OnButtonSetValue(wxCommandEvent
& event
);
121 void OnButtonSetCurrent(wxCommandEvent
& event
);
123 void OnDropdown(wxCommandEvent
& event
);
124 void OnCloseup(wxCommandEvent
& event
);
125 void OnComboBox(wxCommandEvent
& event
);
126 void OnComboText(wxCommandEvent
& event
);
127 void OnComboTextPasted(wxClipboardTextEvent
& event
);
129 void OnCheckOrRadioBox(wxCommandEvent
& event
);
131 void OnUpdateUIInsertionPointText(wxUpdateUIEvent
& event
);
133 void OnUpdateUIInsert(wxUpdateUIEvent
& event
);
134 void OnUpdateUIAddSeveral(wxUpdateUIEvent
& event
);
135 void OnUpdateUIClearButton(wxUpdateUIEvent
& event
);
136 void OnUpdateUIDeleteButton(wxUpdateUIEvent
& event
);
137 void OnUpdateUIDeleteSelButton(wxUpdateUIEvent
& event
);
138 void OnUpdateUIResetButton(wxUpdateUIEvent
& event
);
139 void OnUpdateUISetCurrent(wxUpdateUIEvent
& event
);
141 // reset the combobox parameters
144 // (re)create the combobox
150 // the sel mode radiobox
151 wxRadioBox
*m_radioKind
;
153 // the checkboxes for styles
154 wxCheckBox
*m_chkSort
,
158 // the combobox itself and the sizer it is in
159 wxComboBox
*m_combobox
;
160 wxSizer
*m_sizerCombo
;
162 // the text entries for "Add/change string" and "Delete" buttons
163 wxTextCtrl
*m_textInsert
,
172 DECLARE_EVENT_TABLE()
173 DECLARE_WIDGETS_PAGE(ComboboxWidgetsPage
)
176 // ----------------------------------------------------------------------------
178 // ----------------------------------------------------------------------------
180 BEGIN_EVENT_TABLE(ComboboxWidgetsPage
, WidgetsPage
)
181 EVT_BUTTON(ComboPage_Reset
, ComboboxWidgetsPage::OnButtonReset
)
182 EVT_BUTTON(ComboPage_Popup
, ComboboxWidgetsPage::OnButtonPopup
)
183 EVT_BUTTON(ComboPage_Dismiss
, ComboboxWidgetsPage::OnButtonDismiss
)
184 EVT_BUTTON(ComboPage_Change
, ComboboxWidgetsPage::OnButtonChange
)
185 EVT_BUTTON(ComboPage_Delete
, ComboboxWidgetsPage::OnButtonDelete
)
186 EVT_BUTTON(ComboPage_DeleteSel
, ComboboxWidgetsPage::OnButtonDeleteSel
)
187 EVT_BUTTON(ComboPage_Clear
, ComboboxWidgetsPage::OnButtonClear
)
188 EVT_BUTTON(ComboPage_Insert
, ComboboxWidgetsPage::OnButtonInsert
)
189 EVT_BUTTON(ComboPage_Add
, ComboboxWidgetsPage::OnButtonAdd
)
190 EVT_BUTTON(ComboPage_SetFirst
, ComboboxWidgetsPage::OnButtonSetFirst
)
191 EVT_BUTTON(ComboPage_AddSeveral
, ComboboxWidgetsPage::OnButtonAddSeveral
)
192 EVT_BUTTON(ComboPage_AddMany
, ComboboxWidgetsPage::OnButtonAddMany
)
193 EVT_BUTTON(ComboPage_SetValue
, ComboboxWidgetsPage::OnButtonSetValue
)
194 EVT_BUTTON(ComboPage_SetCurrent
, ComboboxWidgetsPage::OnButtonSetCurrent
)
195 EVT_BUTTON(ComboPage_ContainerTests
, ItemContainerWidgetsPage::OnButtonTestItemContainer
)
197 EVT_TEXT_ENTER(ComboPage_InsertText
, ComboboxWidgetsPage::OnButtonInsert
)
198 EVT_TEXT_ENTER(ComboPage_AddText
, ComboboxWidgetsPage::OnButtonAdd
)
199 EVT_TEXT_ENTER(ComboPage_DeleteText
, ComboboxWidgetsPage::OnButtonDelete
)
201 EVT_UPDATE_UI(ComboPage_InsertionPointText
, ComboboxWidgetsPage::OnUpdateUIInsertionPointText
)
203 EVT_UPDATE_UI(ComboPage_Reset
, ComboboxWidgetsPage::OnUpdateUIResetButton
)
204 EVT_UPDATE_UI(ComboPage_Insert
, ComboboxWidgetsPage::OnUpdateUIInsert
)
205 EVT_UPDATE_UI(ComboPage_AddSeveral
, ComboboxWidgetsPage::OnUpdateUIAddSeveral
)
206 EVT_UPDATE_UI(ComboPage_Clear
, ComboboxWidgetsPage::OnUpdateUIClearButton
)
207 EVT_UPDATE_UI(ComboPage_DeleteText
, ComboboxWidgetsPage::OnUpdateUIClearButton
)
208 EVT_UPDATE_UI(ComboPage_Delete
, ComboboxWidgetsPage::OnUpdateUIDeleteButton
)
209 EVT_UPDATE_UI(ComboPage_Change
, ComboboxWidgetsPage::OnUpdateUIDeleteSelButton
)
210 EVT_UPDATE_UI(ComboPage_ChangeText
, ComboboxWidgetsPage::OnUpdateUIDeleteSelButton
)
211 EVT_UPDATE_UI(ComboPage_DeleteSel
, ComboboxWidgetsPage::OnUpdateUIDeleteSelButton
)
212 EVT_UPDATE_UI(ComboPage_SetCurrent
, ComboboxWidgetsPage::OnUpdateUISetCurrent
)
214 EVT_COMBOBOX(ComboPage_Combo
, ComboboxWidgetsPage::OnComboBox
)
215 EVT_COMBOBOX_DROPDOWN(ComboPage_Combo
, ComboboxWidgetsPage::OnDropdown
)
216 EVT_COMBOBOX_CLOSEUP(ComboPage_Combo
, ComboboxWidgetsPage::OnCloseup
)
217 EVT_TEXT(ComboPage_Combo
, ComboboxWidgetsPage::OnComboText
)
218 EVT_TEXT_ENTER(ComboPage_Combo
, ComboboxWidgetsPage::OnComboText
)
219 EVT_TEXT_PASTE(ComboPage_Combo
, ComboboxWidgetsPage::OnComboTextPasted
)
221 EVT_CHECKBOX(wxID_ANY
, ComboboxWidgetsPage::OnCheckOrRadioBox
)
222 EVT_RADIOBOX(wxID_ANY
, ComboboxWidgetsPage::OnCheckOrRadioBox
)
225 // ============================================================================
227 // ============================================================================
229 #if defined(__WXUNIVERSAL__)
230 #define FAMILY_CTRLS UNIVERSAL_CTRLS
232 #define FAMILY_CTRLS NATIVE_CTRLS
235 IMPLEMENT_WIDGETS_PAGE(ComboboxWidgetsPage
, wxT("Combobox"),
236 FAMILY_CTRLS
| WITH_ITEMS_CTRLS
| COMBO_CTRLS
239 ComboboxWidgetsPage::ComboboxWidgetsPage(WidgetsBookCtrl
*book
,
240 wxImageList
*imaglist
)
241 : ItemContainerWidgetsPage(book
, imaglist
, combobox_xpm
)
246 m_chkProcessEnter
= (wxCheckBox
*)NULL
;
248 m_combobox
= (wxComboBox
*)NULL
;
249 m_sizerCombo
= (wxSizer
*)NULL
;
252 void ComboboxWidgetsPage::CreateContent()
255 What we create here is a frame having 3 panes: style pane is the
256 leftmost one, in the middle the pane with buttons allowing to perform
257 miscellaneous combobox operations and the pane containing the combobox
260 wxSizer
*sizerTop
= new wxBoxSizer(wxHORIZONTAL
);
264 // should be in sync with ComboKind_XXX values
265 static const wxString kinds
[] =
272 m_radioKind
= new wxRadioBox(this, wxID_ANY
, wxT("Combobox &kind:"),
273 wxDefaultPosition
, wxDefaultSize
,
274 WXSIZEOF(kinds
), kinds
,
275 1, wxRA_SPECIFY_COLS
);
277 wxSizer
*sizerLeftTop
= new wxStaticBoxSizer(wxVERTICAL
, this, "&Set style");
279 m_chkSort
= CreateCheckBoxAndAddToSizer(sizerLeftTop
, wxT("&Sort items"));
280 m_chkReadonly
= CreateCheckBoxAndAddToSizer(sizerLeftTop
, wxT("&Read only"));
281 m_chkProcessEnter
= CreateCheckBoxAndAddToSizer(sizerLeftTop
, wxT("Process &Enter"));
283 sizerLeftTop
->Add(5, 5, 0, wxGROW
| wxALL
, 5); // spacer
284 sizerLeftTop
->Add(m_radioKind
, 0, wxGROW
| wxALL
, 5);
286 wxButton
*btn
= new wxButton(this, ComboPage_Reset
, wxT("&Reset"));
287 sizerLeftTop
->Add(btn
, 0, wxALIGN_CENTRE_HORIZONTAL
| wxALL
, 15);
290 wxSizer
*sizerLeftBottom
= new wxStaticBoxSizer(wxVERTICAL
, this, "&Popup");
291 sizerLeftBottom
->Add(new wxButton(this, ComboPage_Popup
, "&Show"),
292 wxSizerFlags().Border().Centre());
293 sizerLeftBottom
->Add(new wxButton(this, ComboPage_Dismiss
, "&Hide"),
294 wxSizerFlags().Border().Centre());
297 wxSizer
*sizerLeft
= new wxBoxSizer(wxVERTICAL
);
298 sizerLeft
->Add(sizerLeftTop
);
299 sizerLeft
->AddSpacer(10);
300 sizerLeft
->Add(sizerLeftBottom
, wxSizerFlags().Expand());
303 wxStaticBox
*box2
= new wxStaticBox(this, wxID_ANY
,
304 wxT("&Change combobox contents"));
305 wxSizer
*sizerMiddle
= new wxStaticBoxSizer(box2
, wxVERTICAL
);
309 sizerRow
= CreateSizerWithTextAndButton(ComboPage_SetCurrent
,
310 wxT("Current &selection"),
314 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
317 sizerRow
= CreateSizerWithTextAndLabel(wxT("Insertion Point"),
318 ComboPage_InsertionPointText
,
320 text
->SetEditable(false);
322 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
324 sizerRow
= CreateSizerWithTextAndButton(ComboPage_Insert
,
325 wxT("&Insert this string"),
326 ComboPage_InsertText
,
328 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
330 sizerRow
= CreateSizerWithTextAndButton(ComboPage_Add
,
331 wxT("&Add this string"),
334 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
336 sizerRow
= CreateSizerWithTextAndButton(ComboPage_SetFirst
,
337 wxT("Change &1st string"),
338 ComboPage_SetFirstText
,
340 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
342 btn
= new wxButton(this, ComboPage_AddSeveral
, wxT("&Append a few strings"));
343 sizerMiddle
->Add(btn
, 0, wxALL
| wxGROW
, 5);
345 btn
= new wxButton(this, ComboPage_AddMany
, wxT("Append &many strings"));
346 sizerMiddle
->Add(btn
, 0, wxALL
| wxGROW
, 5);
348 sizerRow
= CreateSizerWithTextAndButton(ComboPage_Change
,
349 wxT("C&hange current"),
350 ComboPage_ChangeText
,
352 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
354 sizerRow
= CreateSizerWithTextAndButton(ComboPage_Delete
,
355 wxT("&Delete this item"),
356 ComboPage_DeleteText
,
358 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
360 btn
= new wxButton(this, ComboPage_DeleteSel
, wxT("Delete &selection"));
361 sizerMiddle
->Add(btn
, 0, wxALL
| wxGROW
, 5);
363 btn
= new wxButton(this, ComboPage_Clear
, wxT("&Clear"));
364 sizerMiddle
->Add(btn
, 0, wxALL
| wxGROW
, 5);
366 sizerRow
= CreateSizerWithTextAndButton(ComboPage_SetValue
,
368 ComboPage_SetValueText
,
370 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
372 btn
= new wxButton(this, ComboPage_ContainerTests
, wxT("Run &tests"));
373 sizerMiddle
->Add(btn
, 0, wxALL
| wxGROW
, 5);
378 wxSizer
*sizerRight
= new wxBoxSizer(wxVERTICAL
);
379 m_combobox
= new wxComboBox(this, ComboPage_Combo
, wxEmptyString
,
380 wxDefaultPosition
, wxDefaultSize
,
383 sizerRight
->Add(m_combobox
, 0, wxGROW
| wxALL
, 5);
384 sizerRight
->SetMinSize(150, 0);
385 m_sizerCombo
= sizerRight
; // save it to modify it later
387 // the 3 panes panes compose the window
388 sizerTop
->Add(sizerLeft
, 0, wxGROW
| (wxALL
& ~wxLEFT
), 10);
389 sizerTop
->Add(sizerMiddle
, 1, wxGROW
| wxALL
, 10);
390 sizerTop
->Add(sizerRight
, 1, wxGROW
| (wxALL
& ~wxRIGHT
), 10);
392 // final initializations
398 // ----------------------------------------------------------------------------
400 // ----------------------------------------------------------------------------
402 void ComboboxWidgetsPage::Reset()
404 m_chkSort
->SetValue(false);
405 m_chkReadonly
->SetValue(false);
406 m_chkProcessEnter
->SetValue(false);
409 void ComboboxWidgetsPage::CreateCombo()
411 int flags
= ms_defaultFlags
;
413 if ( m_chkSort
->GetValue() )
415 if ( m_chkReadonly
->GetValue() )
416 flags
|= wxCB_READONLY
;
417 if ( m_chkProcessEnter
->GetValue() )
418 flags
|= wxTE_PROCESS_ENTER
;
421 switch ( m_radioKind
->GetSelection() )
424 wxFAIL_MSG( wxT("unknown combo kind") );
427 case ComboKind_Default
:
430 case ComboKind_Simple
:
431 flags
|= wxCB_SIMPLE
;
434 case ComboKind_DropDown
:
435 flags
= wxCB_DROPDOWN
;
442 unsigned int count
= m_combobox
->GetCount();
443 for ( unsigned int n
= 0; n
< count
; n
++ )
445 items
.Add(m_combobox
->GetString(n
));
448 m_sizerCombo
->Detach( m_combobox
);
452 m_combobox
= new wxComboBox(this, ComboPage_Combo
, wxEmptyString
,
453 wxDefaultPosition
, wxDefaultSize
,
457 unsigned int count
= items
.GetCount();
458 for ( unsigned int n
= 0; n
< count
; n
++ )
460 m_combobox
->Append(items
[n
]);
463 m_sizerCombo
->Add(m_combobox
, 0, wxGROW
| wxALL
, 5);
464 m_sizerCombo
->Layout();
467 // ----------------------------------------------------------------------------
469 // ----------------------------------------------------------------------------
471 void ComboboxWidgetsPage::OnButtonReset(wxCommandEvent
& WXUNUSED(event
))
478 void ComboboxWidgetsPage::OnButtonChange(wxCommandEvent
& WXUNUSED(event
))
480 int sel
= m_combobox
->GetSelection();
481 if ( sel
!= wxNOT_FOUND
)
483 m_combobox
->SetString(sel
, m_textChange
->GetValue());
487 void ComboboxWidgetsPage::OnButtonDelete(wxCommandEvent
& WXUNUSED(event
))
490 if ( !m_textDelete
->GetValue().ToULong(&n
) ||
491 (n
>= m_combobox
->GetCount()) )
496 m_combobox
->Delete(n
);
499 void ComboboxWidgetsPage::OnButtonDeleteSel(wxCommandEvent
& WXUNUSED(event
))
501 int sel
= m_combobox
->GetSelection();
502 if ( sel
!= wxNOT_FOUND
)
504 m_combobox
->Delete(sel
);
508 void ComboboxWidgetsPage::OnButtonSetValue(wxCommandEvent
& WXUNUSED(event
))
510 wxString value
= m_textSetValue
->GetValue();
511 m_combobox
->SetValue( value
);
514 void ComboboxWidgetsPage::OnButtonClear(wxCommandEvent
& WXUNUSED(event
))
519 void ComboboxWidgetsPage::OnButtonInsert(wxCommandEvent
& WXUNUSED(event
))
521 static unsigned int s_item
= 0;
523 wxString s
= m_textInsert
->GetValue();
524 if ( !m_textInsert
->IsModified() )
526 // update the default string
527 m_textInsert
->SetValue(wxString::Format(wxT("test item %u"), ++s_item
));
530 if (m_combobox
->GetSelection() >= 0)
531 m_combobox
->Insert(s
, m_combobox
->GetSelection());
534 void ComboboxWidgetsPage::OnButtonAdd(wxCommandEvent
& WXUNUSED(event
))
536 static unsigned int s_item
= 0;
538 wxString s
= m_textAdd
->GetValue();
539 if ( !m_textAdd
->IsModified() )
541 // update the default string
542 m_textAdd
->SetValue(wxString::Format(wxT("test item %u"), ++s_item
));
545 m_combobox
->Append(s
);
548 void ComboboxWidgetsPage::OnButtonSetFirst(wxCommandEvent
& WXUNUSED(event
))
550 if ( m_combobox
->IsListEmpty() )
552 wxLogWarning("No string to change.");
556 m_combobox
->SetString(0, m_textSetFirst
->GetValue());
559 void ComboboxWidgetsPage::OnButtonAddMany(wxCommandEvent
& WXUNUSED(event
))
561 // "many" means 1000 here
562 for ( unsigned int n
= 0; n
< 1000; n
++ )
564 m_combobox
->Append(wxString::Format(wxT("item #%u"), n
));
568 void ComboboxWidgetsPage::OnButtonSetCurrent(wxCommandEvent
& WXUNUSED(event
))
571 if ( !m_textCur
->GetValue().ToLong(&n
) )
574 m_combobox
->SetSelection(n
);
577 void ComboboxWidgetsPage::OnButtonAddSeveral(wxCommandEvent
& WXUNUSED(event
))
579 m_combobox
->Append(wxT("First"));
580 m_combobox
->Append(wxT("another one"));
581 m_combobox
->Append(wxT("and the last (very very very very very very very very very very long) one"));
584 void ComboboxWidgetsPage::OnUpdateUIInsertionPointText(wxUpdateUIEvent
& event
)
587 event
.SetText( wxString::Format(wxT("%ld"), m_combobox
->GetInsertionPoint()) );
590 void ComboboxWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent
& event
)
592 event
.Enable( m_chkSort
->GetValue() ||
593 m_chkReadonly
->GetValue() ||
594 m_chkProcessEnter
->GetValue() );
597 void ComboboxWidgetsPage::OnUpdateUIInsert(wxUpdateUIEvent
& event
)
601 bool enable
= !(m_combobox
->GetWindowStyle() & wxCB_SORT
) &&
602 (m_combobox
->GetSelection() >= 0);
604 event
.Enable(enable
);
608 void ComboboxWidgetsPage::OnUpdateUIDeleteButton(wxUpdateUIEvent
& event
)
613 event
.Enable(m_textDelete
->GetValue().ToULong(&n
) &&
614 (n
< (unsigned)m_combobox
->GetCount()));
618 void ComboboxWidgetsPage::OnUpdateUIDeleteSelButton(wxUpdateUIEvent
& event
)
621 event
.Enable(m_combobox
->GetSelection() != wxNOT_FOUND
);
624 void ComboboxWidgetsPage::OnUpdateUIClearButton(wxUpdateUIEvent
& event
)
627 event
.Enable(m_combobox
->GetCount() != 0);
630 void ComboboxWidgetsPage::OnUpdateUIAddSeveral(wxUpdateUIEvent
& event
)
633 event
.Enable(!(m_combobox
->GetWindowStyle() & wxCB_SORT
));
636 void ComboboxWidgetsPage::OnUpdateUISetCurrent(wxUpdateUIEvent
& event
)
639 event
.Enable( m_textCur
->GetValue().ToLong(&n
) &&
641 (n
>= 0 && (unsigned)n
< m_combobox
->GetCount())) );
644 void ComboboxWidgetsPage::OnComboText(wxCommandEvent
& event
)
649 wxString s
= event
.GetString();
651 wxASSERT_MSG( s
== m_combobox
->GetValue(),
652 wxT("event and combobox values should be the same") );
654 if (event
.GetEventType() == wxEVT_TEXT_ENTER
)
656 wxLogMessage(wxT("Combobox enter pressed (now '%s')"), s
.c_str());
660 wxLogMessage(wxT("Combobox text changed (now '%s')"), s
.c_str());
664 void ComboboxWidgetsPage::OnComboTextPasted(wxClipboardTextEvent
& event
)
666 wxLogMessage("Text pasted from clipboard.");
670 void ComboboxWidgetsPage::OnComboBox(wxCommandEvent
& event
)
672 long sel
= event
.GetInt();
673 const wxString selstr
= wxString::Format(wxT("%ld"), sel
);
674 m_textDelete
->SetValue(selstr
);
675 m_textCur
->SetValue(selstr
);
677 wxLogMessage(wxT("Combobox item %ld selected"), sel
);
679 wxLogMessage(wxT("Combobox GetValue(): %s"), m_combobox
->GetValue().c_str() );
681 if ( event
.GetString() != m_combobox
->GetValue() )
683 wxLogMessage("ERROR: Event has different string \"%s\"",
688 void ComboboxWidgetsPage::OnCheckOrRadioBox(wxCommandEvent
& WXUNUSED(event
))
693 void ComboboxWidgetsPage::OnDropdown(wxCommandEvent
& WXUNUSED(event
))
695 wxLogMessage(wxT("Combobox dropped down"));
698 void ComboboxWidgetsPage::OnCloseup(wxCommandEvent
& WXUNUSED(event
))
700 wxLogMessage(wxT("Combobox closed up"));
703 #endif // wxUSE_COMBOBOX