Make wxComboCtrl::SetButtonPosition() now again work on wxMSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@64412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2010-05-27 15:11:58 +00:00
parent 89e1f57475
commit f2ef438692
3 changed files with 10 additions and 2 deletions

View File

@@ -93,7 +93,11 @@ enum
// Internal use: Secondary popup window type should be used (if available).
wxCC_IFLAG_USE_ALT_POPUP = 0x1000,
// Internal use: Skip popup animation.
wxCC_IFLAG_DISABLE_POPUP_ANIM = 0x2000
wxCC_IFLAG_DISABLE_POPUP_ANIM = 0x2000,
// Internal use: Drop-button is a bitmap button or has non-default size
// (but can still be on either side of the control), regardless whether
// specified by the platform or the application.
wxCC_IFLAG_HAS_NONSTANDARD_BUTTON = 0x4000
};

View File

@@ -2110,6 +2110,9 @@ void wxComboCtrlBase::SetButtonPosition( int width, int height,
m_btnSide = side;
m_btnSpacingX = spacingX;
if ( width > 0 || height > 0 || spacingX )
m_iFlags |= wxCC_IFLAG_HAS_NONSTANDARD_BUTTON;
RecalcAndRefresh();
}

View File

@@ -539,7 +539,8 @@ void wxComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
RECT rBorder;
wxCopyRectToRECT(borderRect, rBorder);
wxUint32 isNonStdButton = (m_iFlags & wxCC_IFLAG_BUTTON_OUTSIDE);
bool isNonStdButton = (m_iFlags & wxCC_IFLAG_BUTTON_OUTSIDE) ||
(m_iFlags & wxCC_IFLAG_HAS_NONSTANDARD_BUTTON);
//
// Get some states for themed drawing