X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7dc234d633e255de95f17d62d513d0525efad1af..67a083dd38d1ad1df8c6a25a58bb2f0ec4f3a936:/samples/combo/combo.cpp diff --git a/samples/combo/combo.cpp b/samples/combo/combo.cpp index a136903a67..7d10b80345 100644 --- a/samples/combo/combo.cpp +++ b/samples/combo/combo.cpp @@ -228,8 +228,9 @@ public: int item, int flags ) const { - // If item is selected or even, use the default rendering. - if ( GetVListBoxComboPopup()->IsCurrent((size_t)item) || + // If item is selected or even, or we are painting the + // combo control itself, use the default rendering. + if ( (flags & (wxODCB_PAINTING_CONTROL|wxODCB_PAINTING_SELECTED)) || (item & 1) == 0 ) { wxOwnerDrawnComboBox::OnDrawBackground(dc,rect,item,flags); @@ -626,7 +627,7 @@ MyFrame::MyFrame(const wxString& title) wxComboCtrl* cc; - wxGenericComboControl* gcc; + wxGenericComboCtrl* gcc; wxOwnerDrawnComboBox* odc; // Create common strings array @@ -744,9 +745,9 @@ MyFrame::MyFrame(const wxString& title) // Tree Ctrl wxComboCtrl // - // Note that we test that wxGenericComboControl works - gcc = new wxGenericComboControl(panel,wxID_ANY,wxEmptyString, - wxDefaultPosition, wxDefaultSize); + // Note that we test that wxGenericComboCtrl works + gcc = new wxGenericComboCtrl(panel,wxID_ANY,wxEmptyString, + wxDefaultPosition, wxDefaultSize); // Set popup interface right away, otherwise some of the calls // below may fail