1 /////////////////////////////////////////////////////////////////////////////
2 // Program: wxWidgets Widgets Sample
4 // Purpose: Part of the widgets sample showing wxComboBox
5 // Author: Vadim Zeitlin
7 // Copyright: (c) 2001 Vadim Zeitlin
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // ============================================================================
13 // ============================================================================
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 // for compilers that support precompilation, includes "wx/wx.h".
20 #include "wx/wxprec.h"
28 // for all others, include the necessary headers
32 #include "wx/bitmap.h"
33 #include "wx/button.h"
34 #include "wx/checkbox.h"
35 #include "wx/combobox.h"
36 #include "wx/radiobox.h"
37 #include "wx/statbox.h"
38 #include "wx/textctrl.h"
43 #include "itemcontainer.h"
45 #include "icons/combobox.xpm"
47 // ----------------------------------------------------------------------------
49 // ----------------------------------------------------------------------------
54 ComboPage_Reset
= wxID_HIGHEST
,
59 ComboPage_InsertionPointText
,
65 ComboPage_SetFirstText
,
75 ComboPage_SetValueText
,
77 ComboPage_ContainerTests
80 // kinds of comboboxes
88 // ----------------------------------------------------------------------------
89 // ComboboxWidgetsPage
90 // ----------------------------------------------------------------------------
92 class ComboboxWidgetsPage
: public ItemContainerWidgetsPage
95 ComboboxWidgetsPage(WidgetsBookCtrl
*book
, wxImageList
*imaglist
);
97 virtual wxControl
*GetWidget() const { return m_combobox
; }
98 virtual wxTextEntryBase
*GetTextEntry() const { return m_combobox
; }
99 virtual wxItemContainer
* GetContainer() const { return m_combobox
; }
100 virtual void RecreateWidget() { CreateCombo(); }
102 // lazy creation of the content
103 virtual void CreateContent();
107 void OnButtonReset(wxCommandEvent
& event
);
108 void OnButtonPopup(wxCommandEvent
&) { m_combobox
->Popup(); }
109 void OnButtonDismiss(wxCommandEvent
&) { m_combobox
->Dismiss(); }
110 void OnButtonChange(wxCommandEvent
& event
);
111 void OnButtonDelete(wxCommandEvent
& event
);
112 void OnButtonDeleteSel(wxCommandEvent
& event
);
113 void OnButtonClear(wxCommandEvent
& event
);
114 void OnButtonInsert(wxCommandEvent
&event
);
115 void OnButtonAdd(wxCommandEvent
& event
);
116 void OnButtonSetFirst(wxCommandEvent
& event
);
117 void OnButtonAddSeveral(wxCommandEvent
& event
);
118 void OnButtonAddMany(wxCommandEvent
& event
);
119 void OnButtonSetValue(wxCommandEvent
& event
);
120 void OnButtonSetCurrent(wxCommandEvent
& event
);
122 void OnDropdown(wxCommandEvent
& event
);
123 void OnCloseup(wxCommandEvent
& event
);
124 void OnComboBox(wxCommandEvent
& event
);
125 void OnComboText(wxCommandEvent
& event
);
126 void OnComboTextPasted(wxClipboardTextEvent
& event
);
128 void OnCheckOrRadioBox(wxCommandEvent
& event
);
130 void OnUpdateUIInsertionPointText(wxUpdateUIEvent
& event
);
132 void OnUpdateUIInsert(wxUpdateUIEvent
& event
);
133 void OnUpdateUIAddSeveral(wxUpdateUIEvent
& event
);
134 void OnUpdateUIClearButton(wxUpdateUIEvent
& event
);
135 void OnUpdateUIDeleteButton(wxUpdateUIEvent
& event
);
136 void OnUpdateUIDeleteSelButton(wxUpdateUIEvent
& event
);
137 void OnUpdateUIResetButton(wxUpdateUIEvent
& event
);
138 void OnUpdateUISetCurrent(wxUpdateUIEvent
& event
);
140 // reset the combobox parameters
143 // (re)create the combobox
149 // the sel mode radiobox
150 wxRadioBox
*m_radioKind
;
152 // the checkboxes for styles
153 wxCheckBox
*m_chkSort
,
157 // the combobox itself and the sizer it is in
158 wxComboBox
*m_combobox
;
159 wxSizer
*m_sizerCombo
;
161 // the text entries for "Add/change string" and "Delete" buttons
162 wxTextCtrl
*m_textInsert
,
171 DECLARE_EVENT_TABLE()
172 DECLARE_WIDGETS_PAGE(ComboboxWidgetsPage
)
175 // ----------------------------------------------------------------------------
177 // ----------------------------------------------------------------------------
179 BEGIN_EVENT_TABLE(ComboboxWidgetsPage
, WidgetsPage
)
180 EVT_BUTTON(ComboPage_Reset
, ComboboxWidgetsPage::OnButtonReset
)
181 EVT_BUTTON(ComboPage_Popup
, ComboboxWidgetsPage::OnButtonPopup
)
182 EVT_BUTTON(ComboPage_Dismiss
, ComboboxWidgetsPage::OnButtonDismiss
)
183 EVT_BUTTON(ComboPage_Change
, ComboboxWidgetsPage::OnButtonChange
)
184 EVT_BUTTON(ComboPage_Delete
, ComboboxWidgetsPage::OnButtonDelete
)
185 EVT_BUTTON(ComboPage_DeleteSel
, ComboboxWidgetsPage::OnButtonDeleteSel
)
186 EVT_BUTTON(ComboPage_Clear
, ComboboxWidgetsPage::OnButtonClear
)
187 EVT_BUTTON(ComboPage_Insert
, ComboboxWidgetsPage::OnButtonInsert
)
188 EVT_BUTTON(ComboPage_Add
, ComboboxWidgetsPage::OnButtonAdd
)
189 EVT_BUTTON(ComboPage_SetFirst
, ComboboxWidgetsPage::OnButtonSetFirst
)
190 EVT_BUTTON(ComboPage_AddSeveral
, ComboboxWidgetsPage::OnButtonAddSeveral
)
191 EVT_BUTTON(ComboPage_AddMany
, ComboboxWidgetsPage::OnButtonAddMany
)
192 EVT_BUTTON(ComboPage_SetValue
, ComboboxWidgetsPage::OnButtonSetValue
)
193 EVT_BUTTON(ComboPage_SetCurrent
, ComboboxWidgetsPage::OnButtonSetCurrent
)
194 EVT_BUTTON(ComboPage_ContainerTests
, ItemContainerWidgetsPage::OnButtonTestItemContainer
)
196 EVT_TEXT_ENTER(ComboPage_InsertText
, ComboboxWidgetsPage::OnButtonInsert
)
197 EVT_TEXT_ENTER(ComboPage_AddText
, ComboboxWidgetsPage::OnButtonAdd
)
198 EVT_TEXT_ENTER(ComboPage_DeleteText
, ComboboxWidgetsPage::OnButtonDelete
)
200 EVT_UPDATE_UI(ComboPage_InsertionPointText
, ComboboxWidgetsPage::OnUpdateUIInsertionPointText
)
202 EVT_UPDATE_UI(ComboPage_Reset
, ComboboxWidgetsPage::OnUpdateUIResetButton
)
203 EVT_UPDATE_UI(ComboPage_Insert
, ComboboxWidgetsPage::OnUpdateUIInsert
)
204 EVT_UPDATE_UI(ComboPage_AddSeveral
, ComboboxWidgetsPage::OnUpdateUIAddSeveral
)
205 EVT_UPDATE_UI(ComboPage_Clear
, ComboboxWidgetsPage::OnUpdateUIClearButton
)
206 EVT_UPDATE_UI(ComboPage_DeleteText
, ComboboxWidgetsPage::OnUpdateUIClearButton
)
207 EVT_UPDATE_UI(ComboPage_Delete
, ComboboxWidgetsPage::OnUpdateUIDeleteButton
)
208 EVT_UPDATE_UI(ComboPage_Change
, ComboboxWidgetsPage::OnUpdateUIDeleteSelButton
)
209 EVT_UPDATE_UI(ComboPage_ChangeText
, ComboboxWidgetsPage::OnUpdateUIDeleteSelButton
)
210 EVT_UPDATE_UI(ComboPage_DeleteSel
, ComboboxWidgetsPage::OnUpdateUIDeleteSelButton
)
211 EVT_UPDATE_UI(ComboPage_SetCurrent
, ComboboxWidgetsPage::OnUpdateUISetCurrent
)
213 EVT_COMBOBOX(ComboPage_Combo
, ComboboxWidgetsPage::OnComboBox
)
214 EVT_COMBOBOX_DROPDOWN(ComboPage_Combo
, ComboboxWidgetsPage::OnDropdown
)
215 EVT_COMBOBOX_CLOSEUP(ComboPage_Combo
, ComboboxWidgetsPage::OnCloseup
)
216 EVT_TEXT(ComboPage_Combo
, ComboboxWidgetsPage::OnComboText
)
217 EVT_TEXT_ENTER(ComboPage_Combo
, ComboboxWidgetsPage::OnComboText
)
218 EVT_TEXT_PASTE(ComboPage_Combo
, ComboboxWidgetsPage::OnComboTextPasted
)
220 EVT_CHECKBOX(wxID_ANY
, ComboboxWidgetsPage::OnCheckOrRadioBox
)
221 EVT_RADIOBOX(wxID_ANY
, ComboboxWidgetsPage::OnCheckOrRadioBox
)
224 // ============================================================================
226 // ============================================================================
228 #if defined(__WXUNIVERSAL__)
229 #define FAMILY_CTRLS UNIVERSAL_CTRLS
231 #define FAMILY_CTRLS NATIVE_CTRLS
234 IMPLEMENT_WIDGETS_PAGE(ComboboxWidgetsPage
, wxT("Combobox"),
235 FAMILY_CTRLS
| WITH_ITEMS_CTRLS
| COMBO_CTRLS
238 ComboboxWidgetsPage::ComboboxWidgetsPage(WidgetsBookCtrl
*book
,
239 wxImageList
*imaglist
)
240 : ItemContainerWidgetsPage(book
, imaglist
, combobox_xpm
)
245 m_chkProcessEnter
= (wxCheckBox
*)NULL
;
247 m_combobox
= (wxComboBox
*)NULL
;
248 m_sizerCombo
= (wxSizer
*)NULL
;
251 void ComboboxWidgetsPage::CreateContent()
254 What we create here is a frame having 3 panes: style pane is the
255 leftmost one, in the middle the pane with buttons allowing to perform
256 miscellaneous combobox operations and the pane containing the combobox
259 wxSizer
*sizerTop
= new wxBoxSizer(wxHORIZONTAL
);
263 // should be in sync with ComboKind_XXX values
264 static const wxString kinds
[] =
271 m_radioKind
= new wxRadioBox(this, wxID_ANY
, wxT("Combobox &kind:"),
272 wxDefaultPosition
, wxDefaultSize
,
273 WXSIZEOF(kinds
), kinds
,
274 1, wxRA_SPECIFY_COLS
);
276 wxSizer
*sizerLeftTop
= new wxStaticBoxSizer(wxVERTICAL
, this, "&Set style");
278 m_chkSort
= CreateCheckBoxAndAddToSizer(sizerLeftTop
, wxT("&Sort items"));
279 m_chkReadonly
= CreateCheckBoxAndAddToSizer(sizerLeftTop
, wxT("&Read only"));
280 m_chkProcessEnter
= CreateCheckBoxAndAddToSizer(sizerLeftTop
, wxT("Process &Enter"));
282 sizerLeftTop
->Add(5, 5, 0, wxGROW
| wxALL
, 5); // spacer
283 sizerLeftTop
->Add(m_radioKind
, 0, wxGROW
| wxALL
, 5);
285 wxButton
*btn
= new wxButton(this, ComboPage_Reset
, wxT("&Reset"));
286 sizerLeftTop
->Add(btn
, 0, wxALIGN_CENTRE_HORIZONTAL
| wxALL
, 15);
289 wxSizer
*sizerLeftBottom
= new wxStaticBoxSizer(wxVERTICAL
, this, "&Popup");
290 sizerLeftBottom
->Add(new wxButton(this, ComboPage_Popup
, "&Show"),
291 wxSizerFlags().Border().Centre());
292 sizerLeftBottom
->Add(new wxButton(this, ComboPage_Dismiss
, "&Hide"),
293 wxSizerFlags().Border().Centre());
296 wxSizer
*sizerLeft
= new wxBoxSizer(wxVERTICAL
);
297 sizerLeft
->Add(sizerLeftTop
);
298 sizerLeft
->AddSpacer(10);
299 sizerLeft
->Add(sizerLeftBottom
, wxSizerFlags().Expand());
302 wxStaticBox
*box2
= new wxStaticBox(this, wxID_ANY
,
303 wxT("&Change combobox contents"));
304 wxSizer
*sizerMiddle
= new wxStaticBoxSizer(box2
, wxVERTICAL
);
308 sizerRow
= CreateSizerWithTextAndButton(ComboPage_SetCurrent
,
309 wxT("Current &selection"),
313 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
316 sizerRow
= CreateSizerWithTextAndLabel(wxT("Insertion Point"),
317 ComboPage_InsertionPointText
,
319 text
->SetEditable(false);
321 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
323 sizerRow
= CreateSizerWithTextAndButton(ComboPage_Insert
,
324 wxT("&Insert this string"),
325 ComboPage_InsertText
,
327 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
329 sizerRow
= CreateSizerWithTextAndButton(ComboPage_Add
,
330 wxT("&Add this string"),
333 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
335 sizerRow
= CreateSizerWithTextAndButton(ComboPage_SetFirst
,
336 wxT("Change &1st string"),
337 ComboPage_SetFirstText
,
339 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
341 btn
= new wxButton(this, ComboPage_AddSeveral
, wxT("&Append a few strings"));
342 sizerMiddle
->Add(btn
, 0, wxALL
| wxGROW
, 5);
344 btn
= new wxButton(this, ComboPage_AddMany
, wxT("Append &many strings"));
345 sizerMiddle
->Add(btn
, 0, wxALL
| wxGROW
, 5);
347 sizerRow
= CreateSizerWithTextAndButton(ComboPage_Change
,
348 wxT("C&hange current"),
349 ComboPage_ChangeText
,
351 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
353 sizerRow
= CreateSizerWithTextAndButton(ComboPage_Delete
,
354 wxT("&Delete this item"),
355 ComboPage_DeleteText
,
357 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
359 btn
= new wxButton(this, ComboPage_DeleteSel
, wxT("Delete &selection"));
360 sizerMiddle
->Add(btn
, 0, wxALL
| wxGROW
, 5);
362 btn
= new wxButton(this, ComboPage_Clear
, wxT("&Clear"));
363 sizerMiddle
->Add(btn
, 0, wxALL
| wxGROW
, 5);
365 sizerRow
= CreateSizerWithTextAndButton(ComboPage_SetValue
,
367 ComboPage_SetValueText
,
369 sizerMiddle
->Add(sizerRow
, 0, wxALL
| wxGROW
, 5);
371 btn
= new wxButton(this, ComboPage_ContainerTests
, wxT("Run &tests"));
372 sizerMiddle
->Add(btn
, 0, wxALL
| wxGROW
, 5);
377 wxSizer
*sizerRight
= new wxBoxSizer(wxVERTICAL
);
378 m_combobox
= new wxComboBox(this, ComboPage_Combo
, wxEmptyString
,
379 wxDefaultPosition
, wxDefaultSize
,
382 sizerRight
->Add(m_combobox
, 0, wxGROW
| wxALL
, 5);
383 sizerRight
->SetMinSize(150, 0);
384 m_sizerCombo
= sizerRight
; // save it to modify it later
386 // the 3 panes panes compose the window
387 sizerTop
->Add(sizerLeft
, 0, wxGROW
| (wxALL
& ~wxLEFT
), 10);
388 sizerTop
->Add(sizerMiddle
, 1, wxGROW
| wxALL
, 10);
389 sizerTop
->Add(sizerRight
, 1, wxGROW
| (wxALL
& ~wxRIGHT
), 10);
391 // final initializations
397 // ----------------------------------------------------------------------------
399 // ----------------------------------------------------------------------------
401 void ComboboxWidgetsPage::Reset()
403 m_chkSort
->SetValue(false);
404 m_chkReadonly
->SetValue(false);
405 m_chkProcessEnter
->SetValue(false);
408 void ComboboxWidgetsPage::CreateCombo()
410 int flags
= ms_defaultFlags
;
412 if ( m_chkSort
->GetValue() )
414 if ( m_chkReadonly
->GetValue() )
415 flags
|= wxCB_READONLY
;
416 if ( m_chkProcessEnter
->GetValue() )
417 flags
|= wxTE_PROCESS_ENTER
;
420 switch ( m_radioKind
->GetSelection() )
423 wxFAIL_MSG( wxT("unknown combo kind") );
426 case ComboKind_Default
:
429 case ComboKind_Simple
:
430 flags
|= wxCB_SIMPLE
;
433 case ComboKind_DropDown
:
434 flags
= wxCB_DROPDOWN
;
441 unsigned int count
= m_combobox
->GetCount();
442 for ( unsigned int n
= 0; n
< count
; n
++ )
444 items
.Add(m_combobox
->GetString(n
));
447 m_sizerCombo
->Detach( m_combobox
);
451 m_combobox
= new wxComboBox(this, ComboPage_Combo
, wxEmptyString
,
452 wxDefaultPosition
, wxDefaultSize
,
456 unsigned int count
= items
.GetCount();
457 for ( unsigned int n
= 0; n
< count
; n
++ )
459 m_combobox
->Append(items
[n
]);
462 m_sizerCombo
->Add(m_combobox
, 0, wxGROW
| wxALL
, 5);
463 m_sizerCombo
->Layout();
466 // ----------------------------------------------------------------------------
468 // ----------------------------------------------------------------------------
470 void ComboboxWidgetsPage::OnButtonReset(wxCommandEvent
& WXUNUSED(event
))
477 void ComboboxWidgetsPage::OnButtonChange(wxCommandEvent
& WXUNUSED(event
))
479 int sel
= m_combobox
->GetSelection();
480 if ( sel
!= wxNOT_FOUND
)
482 m_combobox
->SetString(sel
, m_textChange
->GetValue());
486 void ComboboxWidgetsPage::OnButtonDelete(wxCommandEvent
& WXUNUSED(event
))
489 if ( !m_textDelete
->GetValue().ToULong(&n
) ||
490 (n
>= m_combobox
->GetCount()) )
495 m_combobox
->Delete(n
);
498 void ComboboxWidgetsPage::OnButtonDeleteSel(wxCommandEvent
& WXUNUSED(event
))
500 int sel
= m_combobox
->GetSelection();
501 if ( sel
!= wxNOT_FOUND
)
503 m_combobox
->Delete(sel
);
507 void ComboboxWidgetsPage::OnButtonSetValue(wxCommandEvent
& WXUNUSED(event
))
509 wxString value
= m_textSetValue
->GetValue();
510 m_combobox
->SetValue( value
);
513 void ComboboxWidgetsPage::OnButtonClear(wxCommandEvent
& WXUNUSED(event
))
518 void ComboboxWidgetsPage::OnButtonInsert(wxCommandEvent
& WXUNUSED(event
))
520 static unsigned int s_item
= 0;
522 wxString s
= m_textInsert
->GetValue();
523 if ( !m_textInsert
->IsModified() )
525 // update the default string
526 m_textInsert
->SetValue(wxString::Format(wxT("test item %u"), ++s_item
));
529 if (m_combobox
->GetSelection() >= 0)
530 m_combobox
->Insert(s
, m_combobox
->GetSelection());
533 void ComboboxWidgetsPage::OnButtonAdd(wxCommandEvent
& WXUNUSED(event
))
535 static unsigned int s_item
= 0;
537 wxString s
= m_textAdd
->GetValue();
538 if ( !m_textAdd
->IsModified() )
540 // update the default string
541 m_textAdd
->SetValue(wxString::Format(wxT("test item %u"), ++s_item
));
544 m_combobox
->Append(s
);
547 void ComboboxWidgetsPage::OnButtonSetFirst(wxCommandEvent
& WXUNUSED(event
))
549 if ( m_combobox
->IsListEmpty() )
551 wxLogWarning("No string to change.");
555 m_combobox
->SetString(0, m_textSetFirst
->GetValue());
558 void ComboboxWidgetsPage::OnButtonAddMany(wxCommandEvent
& WXUNUSED(event
))
560 // "many" means 1000 here
561 for ( unsigned int n
= 0; n
< 1000; n
++ )
563 m_combobox
->Append(wxString::Format(wxT("item #%u"), n
));
567 void ComboboxWidgetsPage::OnButtonSetCurrent(wxCommandEvent
& WXUNUSED(event
))
570 if ( !m_textCur
->GetValue().ToLong(&n
) )
573 m_combobox
->SetSelection(n
);
576 void ComboboxWidgetsPage::OnButtonAddSeveral(wxCommandEvent
& WXUNUSED(event
))
578 m_combobox
->Append(wxT("First"));
579 m_combobox
->Append(wxT("another one"));
580 m_combobox
->Append(wxT("and the last (very very very very very very very very very very long) one"));
583 void ComboboxWidgetsPage::OnUpdateUIInsertionPointText(wxUpdateUIEvent
& event
)
586 event
.SetText( wxString::Format(wxT("%ld"), m_combobox
->GetInsertionPoint()) );
589 void ComboboxWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent
& event
)
591 event
.Enable( m_chkSort
->GetValue() ||
592 m_chkReadonly
->GetValue() ||
593 m_chkProcessEnter
->GetValue() );
596 void ComboboxWidgetsPage::OnUpdateUIInsert(wxUpdateUIEvent
& event
)
600 bool enable
= !(m_combobox
->GetWindowStyle() & wxCB_SORT
) &&
601 (m_combobox
->GetSelection() >= 0);
603 event
.Enable(enable
);
607 void ComboboxWidgetsPage::OnUpdateUIDeleteButton(wxUpdateUIEvent
& event
)
612 event
.Enable(m_textDelete
->GetValue().ToULong(&n
) &&
613 (n
< (unsigned)m_combobox
->GetCount()));
617 void ComboboxWidgetsPage::OnUpdateUIDeleteSelButton(wxUpdateUIEvent
& event
)
620 event
.Enable(m_combobox
->GetSelection() != wxNOT_FOUND
);
623 void ComboboxWidgetsPage::OnUpdateUIClearButton(wxUpdateUIEvent
& event
)
626 event
.Enable(m_combobox
->GetCount() != 0);
629 void ComboboxWidgetsPage::OnUpdateUIAddSeveral(wxUpdateUIEvent
& event
)
632 event
.Enable(!(m_combobox
->GetWindowStyle() & wxCB_SORT
));
635 void ComboboxWidgetsPage::OnUpdateUISetCurrent(wxUpdateUIEvent
& event
)
638 event
.Enable( m_textCur
->GetValue().ToLong(&n
) &&
640 (n
>= 0 && (unsigned)n
< m_combobox
->GetCount())) );
643 void ComboboxWidgetsPage::OnComboText(wxCommandEvent
& event
)
648 wxString s
= event
.GetString();
650 wxASSERT_MSG( s
== m_combobox
->GetValue(),
651 wxT("event and combobox values should be the same") );
653 if (event
.GetEventType() == wxEVT_TEXT_ENTER
)
655 wxLogMessage(wxT("Combobox enter pressed (now '%s')"), s
.c_str());
659 wxLogMessage(wxT("Combobox text changed (now '%s')"), s
.c_str());
663 void ComboboxWidgetsPage::OnComboTextPasted(wxClipboardTextEvent
& event
)
665 wxLogMessage("Text pasted from clipboard.");
669 void ComboboxWidgetsPage::OnComboBox(wxCommandEvent
& event
)
671 long sel
= event
.GetInt();
672 const wxString selstr
= wxString::Format(wxT("%ld"), sel
);
673 m_textDelete
->SetValue(selstr
);
674 m_textCur
->SetValue(selstr
);
676 wxLogMessage(wxT("Combobox item %ld selected"), sel
);
678 wxLogMessage(wxT("Combobox GetValue(): %s"), m_combobox
->GetValue().c_str() );
680 if ( event
.GetString() != m_combobox
->GetValue() )
682 wxLogMessage("ERROR: Event has different string \"%s\"",
687 void ComboboxWidgetsPage::OnCheckOrRadioBox(wxCommandEvent
& WXUNUSED(event
))
692 void ComboboxWidgetsPage::OnDropdown(wxCommandEvent
& WXUNUSED(event
))
694 wxLogMessage(wxT("Combobox dropped down"));
697 void ComboboxWidgetsPage::OnCloseup(wxCommandEvent
& WXUNUSED(event
))
699 wxLogMessage(wxT("Combobox closed up"));
702 #endif // wxUSE_COMBOBOX