From ab0c29ae955188b1a882dfeafd1d5f443ea6ca5f Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Wed, 6 May 2009 16:04:20 +0000 Subject: [PATCH] draw focus rect for wxCheckListBox item git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/checklst.cpp | 3 +++ src/msw/ownerdrw.cpp | 7 +------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index 7cfdff2a5f..b06c404120 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -215,6 +215,9 @@ bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc, ImageList_Destroy(himl); + if (stat & wxODHasFocus) + wxRendererNative::Get().DrawFocusRect(m_pParent, dc, rc); + return true; } diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp index c1dbd95207..cce295c617 100644 --- a/src/msw/ownerdrw.cpp +++ b/src/msw/ownerdrw.cpp @@ -294,14 +294,9 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight) // draw the item bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, - wxODAction act, + wxODAction, wxODStatus st) { - // we do nothing on focus change - if ( act == wxODFocusChanged ) - return true; - - // this flag determines whether or not an edge will // be drawn around the bitmap. In most "windows classic" // applications, a 1-pixel highlight edge is drawn around -- 2.47.2