Page 1 of 1

wxTreeCtrl question

Posted: Fri Oct 02, 2009 9:18 pm
by ninja9578
Is there a way to determine if a EVT_TREE_SEL_CHANGED event is a selection or an expansion? I want different behavior if a user clicked on the title then if they clicked on the expand button. I also have my code capturing the EVT_TREE_ITEM_EXPANDING event.

Posted: Sat Oct 03, 2009 6:10 am
by van_user
Maybe you should calculate position of the mouse and check is button under cursor?
I doubt it is possible to know in EVT_TREE_SEL_CHANGED what focus is on child control.

Posted: Sat Oct 03, 2009 8:05 am
by illnatured
I would use the wxTreeCtrl::HitTest method.