Tk Library Source Code

View Ticket
Login
Ticket UUID: 2995969
Title: ListBox: No multiple drag
Type: Bug Version: None
Submitter: oehhar Created on: 2010-05-03 15:31:15
Subsystem: bwidget Assigned To: oehhar
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2010-05-07 01:14:58
Resolution: Fixed Closed By: oehhar
    Closed on: 2010-05-05 06:56:48
Description:
A BWidget listbox with multiple selection may not do multiple drag and drop.

Code:
pack [ListBox .l -selectmode multiple -dragenabled 1 -dropenabled 1]
foreach item {A B C D E F} { .l insert end $item -text $item}

Action:
* Select item "A" and "B" with shift-select.
Issue 1:
* Click on the selection on "A" and move to the end of the list (to get a line) and drop (release mouse button)
  -> the click will unselect "B" and only item "A" will be moved to the end

Issue 2:
* (Restart script and select A and B)
* Shift-Click on the selection on "A" and move to the end of the list (to get a line) and drop (release mouse button)
  -> Only item "B" will be moved to the end

Reported by Robert Karen on c.l.t:
http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/90362f0d0200a5b9/22ffbc8fc3196a1f#22ffbc8fc3196a1f
User Comments: oehhar added on 2010-05-07 01:14:58:
Just uploaded listbox-1.9.0.patch2 with the following properties:
1) use buttonRelease instead Button events for multiple selection
2) drag and drop default function now allows to drag multiple items within one widget.

2) might be relatively weired, because there are so many cases and not all may make everybody happy:
- if current object is not in selection, this object is dragged
- if current object is in selection, the whole selection is dragged

Possible enhancement: select dragged object, if it is not the selection.

oehhar added on 2010-05-07 01:10:55:

File Added - 373092: listbox-1.9.0.diff2

oehhar added on 2010-05-05 13:56:48:
The attached patch uses ButtonRelease instead Button events for multiple select.
This avoids the issue with multiple drag and drop.

The patch was tested by Robert Karen.

I have the feeling, that there might be other side effects.

I am planning to make multiple drag and drop in the same widget possible.
Maybee, someone might help me ?

oehhar added on 2010-05-05 13:52:55:

File Added - 372888: listbox_1.9.0.patch

Attachments: