]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/combobox.cpp
Somebody forgot to restore from testing phase.
[wxWidgets.git] / samples / widgets / combobox.cpp
index 09547692bd45984190ba025ca047a54048ebddc8..df409ff2a8754d9a4ba09e80d97f05f8e161c4d9 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Program:     wxWindows Widgets Sample
+// Program:     wxWidgets Widgets Sample
 // Name:        combobox.cpp
 // Purpose:     Part of the widgets sample showing wxComboBox
 // Author:      Vadim Zeitlin
@@ -84,7 +84,9 @@ enum
 class ComboboxWidgetsPage : public WidgetsPage
 {
 public:
-    ComboboxWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+    ComboboxWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
+
+    virtual wxControl *GetWidget() const { return m_combobox; }
 
 protected:
     // event handlers
@@ -188,9 +190,9 @@ END_EVENT_TABLE()
 
 IMPLEMENT_WIDGETS_PAGE(ComboboxWidgetsPage, _T("Combobox"));
 
-ComboboxWidgetsPage::ComboboxWidgetsPage(wxNotebook *notebook,
-                                       wxImageList *imaglist)
-                  : WidgetsPage(notebook)
+ComboboxWidgetsPage::ComboboxWidgetsPage(wxBookCtrlBase *book,
+                                         wxImageList *imaglist)
+                  : WidgetsPage(book)
 {
     // init everything
     m_chkSort =
@@ -534,7 +536,7 @@ void ComboboxWidgetsPage::OnComboText(wxCommandEvent& event)
     if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
         wxLogMessage(_T("Combobox enter pressed (now '%s')"), s.c_str());
     else
-    wxLogMessage(_T("Combobox text changed (now '%s')"), s.c_str());
+        wxLogMessage(_T("Combobox text changed (now '%s')"), s.c_str());
 }
 
 void ComboboxWidgetsPage::OnComboBox(wxCommandEvent& event)
@@ -543,6 +545,8 @@ void ComboboxWidgetsPage::OnComboBox(wxCommandEvent& event)
     m_textDelete->SetValue(wxString::Format(_T("%ld"), sel));
 
     wxLogMessage(_T("Combobox item %ld selected"), sel);
+
+    wxLogMessage(_T("Combobox GetValue(): %s"), m_combobox->GetValue().c_str() );
 }
 
 void ComboboxWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))