Tk Library Source Code

View Ticket
Login
Ticket UUID: 455732
Title: selection breaks if 1st column invisible
Type: Bug Version: None
Submitter: nobody Created on: 2001-08-27 11:16:29
Subsystem: mclistbox Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2001-09-08 00:00:18
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2001-09-07 17:00:18
Description:
Version info:
wish: 8.3.3
mclistbox: 1.02 (and the cvs version)

The selection gets stuck on the first entry if the
first column of the mclistbox is made invisble.

The following snippet produces the error:

--snip---
package require mclistbox
namespace import ::mclistbox::*

set lb [mclistbox .lb]

$lb column add uid -visible 0
$lb column add login -label "Login" -width 10
$lb column add name -label "Name" -width 14

$lb insert end [list 0 a anaampje]
$lb insert end [list 1 b bnaampje]
$lb insert end [list 2 c cnaampje]

pack $lb
---snip---

Adding -label or -widht options to the invisible column
does not matter.

Moving the invisible column to the end fixes it.

Happy bughunting,

Ric
User Comments: andreas_kupries added on 2001-09-08 00:00:18:
Logged In: YES 
user_id=75003

Committed to head.

andreas_kupries added on 2001-09-07 02:31:08:

File Added - 10452: 455732.diff

andreas_kupries added on 2001-09-07 02:31:07:
Logged In: YES 
user_id=75003

Enclosed a bug fix. The problem seems to be that conversion 
from mouse location to row does not work for an unmapped 
listbox. Added some code to retrieve the first visible 
column and use that for the conversion.

andreas_kupries added on 2001-09-07 01:48:05:
Logged In: YES 
user_id=75003

Tried, verified.

Attachments: