HitTest() now works when the ctrl is scrolled too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
32a95f9f1a
commit
67a7abf778
@ -1444,8 +1444,13 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||
|
||||
wxTreeItemId wxTreeCtrl::HitTest(const wxPoint& point, int& WXUNUSED(flags))
|
||||
{
|
||||
wxClientDC dc(this);
|
||||
PrepareDC(dc);
|
||||
long x = dc.DeviceToLogicalX( (long)point.x );
|
||||
long y = dc.DeviceToLogicalY( (long)point.y );
|
||||
|
||||
bool onButton = FALSE;
|
||||
return m_anchor->HitTest( point, onButton );
|
||||
return m_anchor->HitTest( wxPoint(x, y), onButton );
|
||||
}
|
||||
|
||||
void wxTreeCtrl::OnMouse( wxMouseEvent &event )
|
||||
|
Loading…
Reference in New Issue
Block a user