Hi all,
I have a project using the tree control, which tree items are drag and drop ok. My issue is, I cannot read the key state (Ctrl key) to make decision of moving or copying items.
EVT_TREE_SEL_CHANGED(wxID_ANY, SecsHostFrame::OnTreeCommandItemChanged)
EVT_TREE_ITEM_RIGHT_CLICK(wxID_ANY, SecsHostFrame::OnTreeCommandRightButton)
EVT_TREE_BEGIN_DRAG(wxID_ANY, SecsHostFrame::OnTreeCommandBeginDrag)
EVT_TREE_END_DRAG(wxID_ANY, SecsHostFrame::OnTreeCommandEndDrag)
EVT_TREE_KEY_DOWN(wxID_ANY, SecsHostFrame::OnTreeCommandKeyDown)
I already tried to read key state from the (wxTreeEvent &e) inside the SecsHostFrame::OnTreeCommandEndDrag function. But it does not work.
Is there any one have the same issue with me?
Thankyou.
wxTreeCtrl Drag/Drop with Ctrl key Topic is solved
-
- Knows some wx things
- Posts: 39
- Joined: Sun Oct 10, 2010 1:02 am
Re: wxTreeCtrl Drag/Drop with Ctrl key
In my code, I use wxMouseState to get the mouse state (mstate), during a tree end drag event, then use mstate.CmdDown().
Its possible I had this issue once upon a time, but I cannot recall - it seems odd for me to have reached out for mousestate when everywhere else I use the event. Anyway the above works on GTK, mac and windows, at least for me
Its possible I had this issue once upon a time, but I cannot recall - it seems odd for me to have reached out for mousestate when everywhere else I use the event. Anyway the above works on GTK, mac and windows, at least for me
-
- Knows some wx things
- Posts: 39
- Joined: Sun Oct 10, 2010 1:02 am
Re: wxTreeCtrl Drag/Drop with Ctrl key
Thankyou doublemax, it works great!