dragging multiple nodes of a wxTreeCtrl

Hi list,

I just noticed that dragging more than 1 node of a custom wxTreeCtrl is not working.

When dragging just 1 node, MyTreeCtrl::onLeftDown() (the handler for the EVT_LEFT_DOWN) is reached. See call stack below:

acui.exe!My_TreeCtrl::onLeftDown(wxMouseEvent & event={...}) Line 1090 C++
acui.exe!wxAppConsole::HandleEvent(wxEvtHandler * handler=0x014c86c0, void (wxEvent &)* func=0x0063ade0, wxEvent & event={...}) Line 321 C++
acui.exe!wxEvtHandler::ProcessEventIfMatches(const wxEventTableEntryBase & entry={...}, wxEvtHandler * handler=0x014c86c0, wxEvent & event={...}) Line 1205 C++
acui.exe!wxEventHashTable::HandleEvent(wxEvent & event={...}, wxEvtHandler * self=0x014c86c0) Line 878 + 0x12 bytes C++
acui.exe!wxEvtHandler::ProcessEvent(wxEvent & event={...}) Line 1265 + 0x10 bytes C++
acui.exe!wxWindow::HandleMouseEvent(unsigned int msg=513, int x=49, int y=50, unsigned int flags=1) Line 4923 + 0xd bytes C++
acui.exe!wxWindow::MSWWindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=3276849) Line 2759 + 0x11 bytes C++
acui.exe!wxTreeCtrl::MSWWindowProc(unsigned int nMsg=513, unsigned int wParam=1, long lParam=3276849) Line 2347 + 0x1f bytes C++

···

-----------------
When dragging 2 nodes (both of tehm being selected), MyTreeCtrl::onLeftDown() is not reached. See call stack below:

acui.exe!AQA_TreeCtrl::onSelChanging(wxTreeEvent & event={...}) Line 1276 C++
acui.exe!wxAppConsole::HandleEvent(wxEvtHandler * handler=0x014c86c0, void (wxEvent &)* func=0x0063ae60, wxEvent & event={...}) Line 321 C++
acui.exe!wxEvtHandler::ProcessEventIfMatches(const wxEventTableEntryBase & entry={...}, wxEvtHandler * handler=0x014c86c0, wxEvent & event={...}) Line 1205 C++
acui.exe!wxEventHashTable::HandleEvent(wxEvent & event={...}, wxEvtHandler * self=0x014c86c0) Line 878 + 0x12 bytes C++
acui.exe!wxEvtHandler::ProcessEvent(wxEvent & event={...}) Line 1265 + 0x10 bytes C++
acui.exe!wxTreeCtrl::MSWOnNotify(int idCtrl=1000, long lParam=1242456, long * result=0x0012f2b0) Line 2727 + 0xd bytes C++

How could I drag multiple nodes of a wxTreeCtrl however? Did anyone do this already?

Thank you,

Cristina.

I just noticed that dragging more than 1 node of a custom wxTreeCtrl
is not working.

When dragging just 1 node, MyTreeCtrl::onLeftDown() (the handler for
the EVT_LEFT_DOWN) is reached. See call stack below:

...

When dragging 2 nodes (both of tehm being selected),
MyTreeCtrl::onLeftDown() is not reached.

I think you're supposed to use EVT_TREE_BEGIN_DRAG for dragging the tree
items instead of interfering with the normal mouse events processing.

Regards,
VZ

···

On Sat, 05 May 2007 00:09:06 +0300 cai <public.cai@gmail.com> wrote:

--
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/