Menu

#33 <Control-ButtonPress-1> in treeview

open
nobody
None
5
2002-03-20
2002-03-20
No

in multiple selection mode, if I some of the entries
are selected using the binding <Control-ButtonPress-1>
then then if you press the button on the last entry
selected (previously) the anchor does not change ( as
in hiertable ).

the solution could be

proc blt:📺:SetSelectionAnchor { w tagOrId } {
set index [$w index $tagOrId]
# If the anchor hasn't changed, don't do anything
# if { $index != [$w index anchor] } {
$w selection clearall
$w see $index
$w focus $index
$w selection set $index
$w selection anchor $index
# }
}

note the comment

and that is the same code as in hierbox.tcl

best regards

Jorge Suit

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.