fixes and missing files from the first wxComboControl patch (update of patch 1479938)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-05-09 16:18:19 +00:00
parent 65b977e5b3
commit 6d0ce565ff
9 changed files with 389 additions and 344 deletions

View File

@@ -260,7 +260,7 @@ void wxGenericComboControl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
DrawButton(dc,rectb,true);
// paint required portion on the control
if ( !m_text || m_widthCustomPaint )
if ( (!m_text || m_widthCustomPaint) )
{
wxASSERT( m_widthCustomPaint >= 0 );
@@ -272,7 +272,10 @@ void wxGenericComboControl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
dc.SetFont( GetFont() );
dc.SetClippingRegion(rect);
m_popupInterface->PaintComboControl(dc,rect);
if ( m_popupInterface )
m_popupInterface->PaintComboControl(dc,rect);
else
wxComboPopup::DefaultPaintComboControl(this,dc,rect);
}
}
@@ -286,7 +289,14 @@ void wxGenericComboControl::OnMouseEvent( wxMouseEvent& event )
if ( PreprocessMouseEvent(event,handlerFlags) )
return;
if ( (m_windowStyle & (wxCC_SPECIAL_DCLICK|wxCB_READONLY)) == wxCB_READONLY )
#ifdef __WXMSW__
const bool ctrlIsButton = true;
#else
const bool ctrlIsButton = false;
#endif
if ( ctrlIsButton &&
(m_windowStyle & (wxCC_SPECIAL_DCLICK|wxCB_READONLY)) == wxCB_READONLY )
{
// if no textctrl and no special double-click, then the entire control acts
// as a button