int item, int flags ) const
{
- // If item is selected or even, use the default rendering.
+ // If item is selected or even, or we are painting the
+ // combo control itself, use the default rendering.
if ( GetVListBoxComboPopup()->IsCurrent((size_t)item) ||
+ (flags & wxODCB_PAINTING_CONTROL) ||
(item & 1) == 0 )
{
wxOwnerDrawnComboBox::OnDrawBackground(dc,rect,item,flags);
void wxOwnerDrawnComboBox::OnDrawBackground(wxDC& dc, const wxRect& rect, int item, int flags) const
{
// we need to render selected and current items differently
- if ( GetVListBoxComboPopup()->IsCurrent((size_t)item) )
+ if ( GetVListBoxComboPopup()->IsCurrent((size_t)item) ||
+ (flags & wxODCB_PAINTING_CONTROL) )
{
DrawFocusBackground(dc,
rect,