+// This is called from wxVListBoxComboPopup::OnDrawItem, with text colour and font prepared
+void wxVListBoxComboPopup::OnDrawItem( wxDC& dc, const wxRect& rect, int item, int flags ) const
+{
+ if ( flags & wxCP_PAINTING_CONTROL )
+ {
+ dc.DrawText( m_combo->GetValue(),
+ rect.x + m_combo->GetTextIndent(),
+ (rect.height-dc.GetCharHeight())/2 + rect.y );
+ }
+ else
+ {
+ dc.DrawText( GetString(item), rect.x + 2, rect.y );
+ }
+}
+
+void wxVListBoxComboPopup::DismissWithEvent()
+{
+ int selection = wxVListBox::GetSelection();
+
+ Dismiss();
+
+ wxString valStr;
+ if ( selection != wxNOT_FOUND )
+ valStr = m_strings[selection];
+ else
+ valStr = wxEmptyString;
+
+ m_value = selection;
+
+ if ( valStr != m_combo->GetValue() )
+ m_combo->SetValue(valStr);
+
+ SendComboBoxEvent(selection);
+}
+
+void wxVListBoxComboPopup::SendComboBoxEvent( int selection )