wxTreeCtrl: Cancel drag strange behaviour. BUG?

I am starting to think this is a bug.

I have modified the TreeCtrl example in the
demo and attached it. What I did was to add the simple drag and drop example from the
wiki. (BTW I think this should be a port of the TreeCtrl demo)

Then I removed the deletion of the dragged node in OnEndDrag. Basically
I am not doing anything in OnEndDrag. But if you drag anything it will become
permanently selected.

To see what I mean in the demo.

Expand the tree until you see the leafnodes.
Drag one leaf node anywhere.

The leafnode you dragged will be permanently selected.
If this is intended behaviour what are you supposed to
do to cancel the drag in TREE_END_DRAG?

Cheers,

Toni

TreeCtrl.py (8.42 KB)

···

-----Original Message-----
From: Toni Brkic [mailto:Toni.Brkic@switchcore.com]
Sent: Thursday, October 21, 2004 1:11 AM
To: wxPython-users (E-mail)
Subject: [wxPython-users] wxTreeCtrl: Cancel drag strange behaviour.

Hi,

I get a strange behaviour when doing drag with a tree ctrl.
If I dont delete
the treeitem that I dragged it will be be "blue" constantly
ie have the same color
as an selected item. But I cant select it, when I select it
nothing happens
no TREE_SEL_CHANGED event happens. I can still select other items.

Do I have to call a special function if the drag is canceled?

I use Linux, Suse9.1

Best regards,

Toni

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org

Toni Brkic wrote:

I am starting to think this is a bug.

I agree. Please enter a bug report about it in the the bug tracker, using a category of "Generic".

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!