X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/453535a739f649ce43a65fd7e6b9730363bb1b7c..a97d569cbbf90ba8bb293214055c3a8c19d447b5:/samples/widgets/combobox.cpp diff --git a/samples/widgets/combobox.cpp b/samples/widgets/combobox.cpp index 2ac76337af..5485a1b09f 100644 --- a/samples/widgets/combobox.cpp +++ b/samples/widgets/combobox.cpp @@ -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); @@ -318,7 +322,7 @@ void ComboboxWidgetsPage::CreateContent() wxDefaultPosition, wxDefaultSize, 0, NULL, 0); - sizerRight->Add(m_combobox, 1, wxGROW | wxALL, 5); + sizerRight->Add(m_combobox, 0, wxGROW | wxALL, 5); sizerRight->SetMinSize(150, 0); m_sizerCombo = sizerRight; // save it to modify it later @@ -343,6 +347,7 @@ void ComboboxWidgetsPage::Reset() { m_chkSort->SetValue(false); m_chkReadonly->SetValue(false); + m_chkFilename->SetValue(false); } void ComboboxWidgetsPage::CreateCombo() @@ -390,6 +395,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 +519,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)