applied patches from Mike Oliver <oliver@math.ucla.edu> to return click position for item (right) click events in treectrl

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2000-11-10 16:44:27 +00:00
parent 779812aa23
commit 8591268f8f
2 changed files with 5 additions and 0 deletions

View File

@ -2449,6 +2449,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
wxTreeEvent nevent(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, GetId());
nevent.m_item = (long) item;
nevent.m_code = 0;
nevent.m_pointDrag = wxPoint(x, y);
nevent.SetEventObject(this);
GetEventHandler()->ProcessEvent(nevent);
}
@ -2501,6 +2502,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
wxTreeEvent nevent( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, GetId() );
nevent.m_item = (long) item;
nevent.m_code = 0;
nevent.m_pointDrag = wxPoint(x, y);
nevent.SetEventObject( this );
GetEventHandler()->ProcessEvent( nevent );
}

View File

@ -2225,6 +2225,9 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
eventType = (int)hdr->code == NM_DBLCLK
? wxEVT_COMMAND_TREE_ITEM_ACTIVATED
: wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK;
event.m_pointDrag.x = tvhti.pt.x;
event.m_pointDrag.y = tvhti.pt.y;
}
break;