]> git.saurik.com Git - wxWidgets.git/commitdiff
draw focus rect for wxCheckListBox item
authorPaul Cornett <paulcor@bullseye.com>
Wed, 6 May 2009 16:04:20 +0000 (16:04 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Wed, 6 May 2009 16:04:20 +0000 (16:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/checklst.cpp
src/msw/ownerdrw.cpp

index 7cfdff2a5f6ab84e35f490bdb42d31ed2f7f8cf2..b06c404120cb9c8583c0948925ba36d8eb30d0cd 100644 (file)
@@ -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;
 }
 
index c1dbd9520700673398482ed780299f3ffc3e0f29..cce295c6178eb3210752673a246557ff8bc0636d 100644 (file)
@@ -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