From 89448b5dd71b413daa7bb3aacabe7cc431b57fd1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 21 Feb 2005 00:10:56 +0000 Subject: [PATCH] use different image for pressed button state git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datectlg.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index f44aec61dd..05524a461f 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -155,10 +155,6 @@ bool wxDropdownButton::Create(wxWindow *parent, pos, wxDefaultSize, BTN_FLAGS, validator) ) return false; -#if (BTNFLAGS & wxBU_AUTODRAW ) == 0 - m_windowStyle |= wxBU_AUTODRAW; -#endif - const wxSize sz = GetSize(); int w = chkBmp.GetWidth(), h = chkBmp.GetHeight(); @@ -196,8 +192,15 @@ void wxDropdownButton::DoMoveWindow(int x, int y, int w, int h) wxBitmap bmp(bw, bh); dc.SelectObject(bmp); - wxRendererNative::Get().DrawComboBoxDropButton(this, dc, wxRect(0,0,bw, bh)); + wxRect r(0,0,bw, bh); + wxRendererNative& renderer = wxRendererNative::Get(); + renderer.DrawComboBoxDropButton(this, dc, r); SetBitmapLabel(bmp); + + wxBitmap bmpSel(bw, bh); + dc.SelectObject(bmpSel); + renderer.DrawComboBoxDropButton(this, dc, r, wxCONTROL_PRESSED); + SetBitmapSelected(bmpSel); } wxBitmapButton::DoMoveWindow(x, y, w, h); -- 2.45.2