draw focus rect for wxCheckListBox item
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@60531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -232,6 +232,13 @@ bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc,
|
|||||||
SelectInHDC selBrush2(hdc, ::GetStockObject(NULL_BRUSH));
|
SelectInHDC selBrush2(hdc, ::GetStockObject(NULL_BRUSH));
|
||||||
Rectangle(hdc, x, y, x + nCheckWidth, y + nCheckHeight);
|
Rectangle(hdc, x, y, x + nCheckWidth, y + nCheckHeight);
|
||||||
|
|
||||||
|
if (stat & wxODHasFocus)
|
||||||
|
{
|
||||||
|
RECT rect;
|
||||||
|
wxCopyRectToRECT(rc, rect);
|
||||||
|
DrawFocusRect(hdc, &rect);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -262,14 +262,9 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight)
|
|||||||
// draw the item
|
// draw the item
|
||||||
bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
|
bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
|
||||||
const wxRect& rc,
|
const wxRect& rc,
|
||||||
wxODAction act,
|
wxODAction,
|
||||||
wxODStatus st)
|
wxODStatus st)
|
||||||
{
|
{
|
||||||
// we do nothing on focus change
|
|
||||||
if ( act == wxODFocusChanged )
|
|
||||||
return true;
|
|
||||||
|
|
||||||
|
|
||||||
// this flag determines whether or not an edge will
|
// this flag determines whether or not an edge will
|
||||||
// be drawn around the bitmap. In most "windows classic"
|
// be drawn around the bitmap. In most "windows classic"
|
||||||
// applications, a 1-pixel highlight edge is drawn around
|
// applications, a 1-pixel highlight edge is drawn around
|
||||||
|
Reference in New Issue
Block a user