]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/combobox.cpp
compilation fix for previous commit
[wxWidgets.git] / samples / widgets / combobox.cpp
index 14e4333cafa8833859860689e7169c9382b58608..933864004cede505614612236410c473e2ca8e74 100644 (file)
@@ -134,7 +134,8 @@ protected:
 
     // the checkboxes for styles
     wxCheckBox *m_chkSort,
-               *m_chkReadonly;
+               *m_chkReadonly,
+               *m_chkFilename;
 
     // the combobox itself and the sizer it is in
     wxComboBox *m_combobox;
@@ -211,7 +212,8 @@ ComboboxWidgetsPage::ComboboxWidgetsPage(WidgetsBookCtrl *book,
 {
     // init everything
     m_chkSort =
-    m_chkReadonly = (wxCheckBox *)NULL;
+    m_chkReadonly =
+    m_chkFilename = (wxCheckBox *)NULL;
 
     m_combobox = (wxComboBox *)NULL;
     m_sizerCombo = (wxSizer *)NULL;
@@ -247,6 +249,8 @@ void ComboboxWidgetsPage::CreateContent()
 
     m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Sort items"));
     m_chkReadonly = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Read only"));
+    m_chkFilename = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&File name"));
+    m_chkFilename->Disable(); // not implemented yet
 
     sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
     sizerLeft->Add(m_radioKind, 0, wxGROW | wxALL, 5);
@@ -331,8 +335,6 @@ void ComboboxWidgetsPage::CreateContent()
     Reset();
 
     SetSizer(sizerTop);
-
-    sizerTop->Fit(this);
 }
 
 // ----------------------------------------------------------------------------
@@ -343,6 +345,7 @@ void ComboboxWidgetsPage::Reset()
 {
     m_chkSort->SetValue(false);
     m_chkReadonly->SetValue(false);
+    m_chkFilename->SetValue(false);
 }
 
 void ComboboxWidgetsPage::CreateCombo()
@@ -390,6 +393,11 @@ void ComboboxWidgetsPage::CreateCombo()
                                 0, NULL,
                                 flags);
 
+#if 0
+    if ( m_chkFilename->GetValue() )
+        ;
+#endif // TODO
+
     unsigned int count = items.GetCount();
     for ( unsigned int n = 0; n < count; n++ )
     {
@@ -509,8 +517,9 @@ void ComboboxWidgetsPage::OnUpdateUIInsertionPointText(wxUpdateUIEvent& event)
 
 void ComboboxWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& event)
 {
-    if (m_combobox)
-        event.Enable( m_chkSort->GetValue() || m_chkReadonly->GetValue() );
+    event.Enable( m_chkSort->GetValue() ||
+                    m_chkReadonly->GetValue() ||
+                        m_chkFilename->GetValue() );
 }
 
 void ComboboxWidgetsPage::OnUpdateUIInsert(wxUpdateUIEvent& event)