From: Robert Karen on
on ms windows at least, if you:
1. select multiple items in a BWidget Listbox using click, then shift
click,
2. then, try to drag/drop,

the click that begins the drag/drop is clearing all selections and
selecting that item ONLY.
I believe it should have some logic that when you click on an item
_that is already selected_, it does NOT select
it and clear other selections. The select of this item and clearing of
others will only happen with the button-release.

Can anyone suggest quick fix for this? Thanks!

This is with wish 8.5 and BWidget 1.9.0.
From: Harald Oehlmann on
On 30 Apr., 18:53, Robert Karen <robert.d.ka...(a)gmail.com> wrote:
> on ms windows at least, if you:
> 1. select multiple items in a BWidget Listbox using click, then shift
> click,
> 2. then, try to drag/drop,
>
> the click that begins the drag/drop is clearing all selections and
> selecting that item ONLY.
> I believe it should have some logic that when you click on an item
> _that is already selected_, it does NOT select
> it and clear other selections. The select of this item and clearing of
> others will only happen with the button-release.
>
> Can anyone suggest quick fix for this? Thanks!
>
> This is with wish 8.5 and BWidget 1.9.0.

Sorry, quick reaction, no test, did you use the ListBox option:
-selectmode multiple

Please reply and I will test.
Regards,
Harald
From: Harald Oehlmann on
On 30 Apr., 18:53, Robert Karen <robert.d.ka...(a)gmail.com> wrote:
> on ms windows at least, if you:
> 1. select multiple items in a BWidget Listbox using click, then shift
> click,
> 2. then, try to drag/drop,
>
> the click that begins the drag/drop is clearing all selections and
> selecting that item ONLY.
> I believe it should have some logic that when you click on an item
> _that is already selected_, it does NOT select
> it and clear other selections. The select of this item and clearing of
> others will only happen with the button-release.
>
> Can anyone suggest quick fix for this? Thanks!
>
> This is with wish 8.5 and BWidget 1.9.0.

Issue checked and confirmed, registered as tcllib bug 2995969:
https://sourceforge.net/tracker/?func=detail&aid=2995969&group_id=12883&atid=112883

I am sorry, I fear there is no quick fixs but a conceptual issue.
After a quick scan on the source code, it seams to me, that drag and
drop of multiple items was never prevued.
IMHO the relevant code is missing.

Sorry,
Harald
From: Robert Karen on
> Issue checked and confirmed, registered as tcllib bug 2995969:https://sourceforge.net/tracker/?func=detail&aid=2995969&group_id=128...
>
> I am sorry, I fear there is no quick fixs but a conceptual issue.
> After a quick scan on the source code, it seams to me, that drag and
> drop of multiple items was never prevued.
> IMHO the relevant code is missing.
>
> Sorry,
> Harald

Thanks for responding. For whatever it's worth, I have a quick fix to
at least reduce
impact of the bug. I have bindText <ButtonPress-1> command and in the
callback I have
the code below. This alows me to use shift-click a range and then drag/
drop it. It
creates a bug whereby if user subsequently clicks on an item within
the range of selected
items, it should, but does not clear the selections.

if {[lsearch [$list curselection] $node] != -1} {
# already selected. do nothing.
} else {
$list selection clear all
$list selection set $node
# set mark for Shift click. this is taken from
BWidget::_select in BWidget::listbox.tcl.
set widgetVarName ::ListBox::$list
# original code doesnt have '1 == 1'. I don't get their
logic. RK
if {1 == 1 || ![info exists $widgetVarName\(anchor)] || !
[info exists $widgetVarName\(sel_anchor)] } {
set idx $node
# these two lines appear in listbox.tcl in
_multiple_select proc. mimic them here.
#set data(anchor) $idx
#set data(sel_anchor) {}
set $widgetVarName\(anchor) $idx
set $widgetVarName\(sel_anchor) {}
}
}
From: Harald Oehlmann on
For the records, please look to bug report:
http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/90362f0d0200a5b9#
containing a patch.

Karen also reported the obvious bug in auto scroll of the tree widget:
Current line:
set data(dnd,afterid) [after 200 [list Tree::_scroll $path $scroll]]
To modify to:
set data(dnd,afterid) [after 200 [concat [list Tree::_scroll $path]
$scroll]]

A bug will be opened, just to note it somewhere...