X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c8d380be4db7bf72539072949209dc816f3e01a7..b2b0bee6d822b05fea419e8bf24ab4009cb17ac4:/samples/widgets/bmpcombobox.cpp diff --git a/samples/widgets/bmpcombobox.cpp b/samples/widgets/bmpcombobox.cpp index 9c055063af..fc8a64fa3c 100644 --- a/samples/widgets/bmpcombobox.cpp +++ b/samples/widgets/bmpcombobox.cpp @@ -240,10 +240,15 @@ BitmapComboBoxWidgetsPage::BitmapComboBoxWidgetsPage(WidgetsBookCtrl *book, { // init everything m_chkSort = - m_chkReadonly = (wxCheckBox *)NULL; + m_chkReadonly = NULL; - m_combobox = (wxBitmapComboBox *)NULL; - m_sizerCombo = (wxSizer *)NULL; + m_combobox = NULL; + m_sizerCombo = NULL; + + m_textInsert = + m_textChangeHeight = + m_textChange = + m_textDelete = NULL; } // create a sizer containing a label and a small text ctrl @@ -273,7 +278,6 @@ void BitmapComboBoxWidgetsPage::CreateContent() miscellaneous combobox operations and the pane containing the combobox itself to the right */ - //wxTextCtrl *text; wxSizer *sizerRow; wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL); @@ -513,7 +517,8 @@ void BitmapComboBoxWidgetsPage::OnButtonInsert(wxCommandEvent& WXUNUSED(event)) void BitmapComboBoxWidgetsPage::OnTextChangeHeight(wxCommandEvent& WXUNUSED(event)) { long h = 0; - m_textChangeHeight->GetValue().ToLong(&h); + if ( m_textChangeHeight ) + m_textChangeHeight->GetValue().ToLong(&h); if ( h < 5 ) return; m_combobox->SetSize(wxDefaultCoord, h); @@ -564,7 +569,7 @@ void BitmapComboBoxWidgetsPage::OnButtonAddSeveralWithImages(wxCommandEvent& WXU { "Black circle", 0x000000 }, }; - for ( int i = 0; i < WXSIZEOF(s_entries); i++ ) + for ( unsigned i = 0; i < WXSIZEOF(s_entries); i++ ) { const TestEntry& e = s_entries[i]; m_combobox->Append(e.text, CreateBitmap(wxColour(e.rgb)));