Tk Library Source Code

View Ticket
Login
Ticket UUID: 1029144
Title: bwidget listbox multi selection handles ctrl key wrong
Type: Bug Version: None
Submitter: pandur Created on: 2004-09-16 11:47:18
Subsystem: bwidget Assigned To: damonc
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-06-30 22:46:09
Resolution: Fixed Closed By: oehhar
    Closed on: 2009-06-30 15:46:09
Description:
the multi-selection mode of listbox has a rather non-
intuitive "feature": when holding down ctrl key and 
clicking on an unselected item it selects it - so far so 
good - when clicking on a selected item nothing changes.

One would expect (from experience with other listboxes) 
that clicking on a selected item with Ctrl-key held would 
de-select the item.

Tested with: BWidget 1.6 and CVS-Head as of 2004-09-
16
User Comments: oehhar added on 2009-06-30 22:46:09:
Correct.
Test script:
pack [ListBox .l -selectmode multiple]
.l insert end 2 -text a
.l insert end 1 -text b
.l insert end 0 -text c

The code was there but there was an error->Fixed in cvs

pandur added on 2004-09-16 19:22:25:
Logged In: YES 
user_id=59057

This is a nice bug in ListBox::_mouse_select.

it should read like:
set ret [eval selection [list $path] ...]
switch -- $cmd {
 ....
}
return $ret


The return value is required in ListBox::_multiple_select