Skip Menu |

This queue is for tickets about the Tk-JComboBox CPAN distribution.

Report information
The Basics
Id: 11707
Status: resolved
Priority: 0/
Queue: Tk-JComboBox

People
Owner: Nobody in particular
Requestors: ken.prows#online-rewards.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.0
Fixed in: 1.03



Subject: AutoFind sub does not scroll down to "see" the new selection
When there are a lot of choices is the combo box, it is convenient to press a letter/number on the keyboard to scroll down to the choices that begin with that letter. The AutoFind sub seems to do this. However, the AutoFind sub only highlights the choice that begins with the letter. It does not scroll down/up so that it is viewable. This makes the otherwise great functionality not so useful. I submit a patch that fixes this behavior: To fix it, add this: $listbox->see($index); Below the following line in the AutoFind sub: $listbox->selectionSet($index); ---------- BTW, I really like your JComboBox module :) - Ken Prows
[guest - Tue Mar 1 13:55:10 2005]: Show quoted text
> When there are a lot of choices is the combo box, it is convenient to > press a letter/number on the keyboard to scroll down to the choices > that begin with that letter. The AutoFind sub seems to do this. > However, the AutoFind sub only highlights the choice that begins > with the letter. It does not scroll down/up so that it is viewable. > This makes the otherwise great functionality not so useful. I > submit a patch that fixes this behavior:
Thanks very much. This is definitely a bug. That was the behavior I had in mind, but I must have left it out when I did an overhaul in version 1.00. I'll do another release tomorrow. I need to update my test suite with a test for the bug, and make sure that nothing else needs to be added to the docs. Show quoted text
> > To fix it, add this: > > $listbox->see($index); > > Below the following line in the AutoFind sub: > > $listbox->selectionSet($index); >
This is the right idea, and the right method to call, but perhaps not the best place to make the call. If it's where I think you're suggesting, then there are times when it won't get called when it should. I'm going to put towards the end of the sub, either before or after where showPopup is called - I don't think it matters which. I'm testing it now. Show quoted text
> BTW, I really like your JComboBox module :)
I'm glad that you find it useful. Thanks again for taking the time to report the problem AND suggest a fix. It will be fixed, in 1.03 -- once I release it, I'll close this bug. Rob
[RCS - Tue Mar 1 23:23:06 2005]: Show quoted text
> [guest - Tue Mar 1 13:55:10 2005]: >
> > When there are a lot of choices is the combo box, it is convenient to > > press a letter/number on the keyboard to scroll down to the choices > > that begin with that letter. The AutoFind sub seems to do this. > > However, the AutoFind sub only highlights the choice that begins > > with the letter. It does not scroll down/up so that it is viewable. > > This makes the otherwise great functionality not so useful. I > > submit a patch that fixes this behavior:
> > Thanks very much. This is definitely a bug. That was the behavior I had > in mind, but I must have left it out when I did an overhaul in version > 1.00. I'll do another release tomorrow. I need to update my test suite > with a test for the bug, and make sure that nothing else needs to be > added to the docs. >
> > > > To fix it, add this: > > > > $listbox->see($index); > > > > Below the following line in the AutoFind sub: > > > > $listbox->selectionSet($index); > >
> > This is the right idea, and the right method to call, but perhaps not > the best place to make the call. If it's where I think you're > suggesting, then there are times when it won't get called when it > should. I'm going to put towards the end of the sub, either before or > after where showPopup is called - I don't think it matters which. I'm > testing it now. >
> > BTW, I really like your JComboBox module :)
> > I'm glad that you find it useful. Thanks again for taking the time to > report the problem AND suggest a fix. > > It will be fixed, in 1.03 -- once I release it, I'll close this bug. > > Rob
<PRE> ## This is a test my $mw = MainWindow->new; my $jcb = $mw->JComboBox( -mode => 'editable', -choices => [qw/one two three four/] )->pack; </PRE>