Problem with Scrolled Listbox in a LabFrame on MSWin32

"Town, David" <[email protected]> Mon, 27 Nov 2006 16:54:48 -0500
Newsgroups gmane.comp.lang.perl.tk
Message-ID <A1E953027E21E940858E9FD7D2A6480C14596A@uspitsmsgusr09.win.marconi.com>
I have a Scrolled Listbox inside a LabFrame which is inside a DialogBox.  If
I populate the Listbox with a list that does not require a scrollbar (pop up
the DialogBox and close it) and then populate the Listbox with a list that
does require a scrollbar (pop up the DialogBox) the scrollbar appears like
there is nothing to scroll.  If I change the LabFrame to a Frame, the
problem does not happen.  If I replace LabFrame.pm (v4.010) with LabFrame.pm
(v3.021) from Tk 800.024, the problem does not happen.  The problem also
does not seem to happen on Linux or Solaris, only MSWin32.
 
Any suggestions?
 
-David
 
 
I have the following versions:
 
Perl: ActivePerl-5.8.8.819-MSWin32-x86-267479
Tk: Tk-804.027-p4.patch
MSWin32 (XP - SP2)
 
The code illustrates the problem.  First click on "Short List" to display
the DialogBox, click "OK" to close the box, and then click on "Long List".  
 
===
 
use Tk;
use Tk::DialogBox;
use Tk::LabFrame;
 
my $mw = MainWindow->new();
 
my $db = $mw->DialogBox(qw/-title test/);
 
my $lf = $db->LabFrame(-label => 'Test')->pack();
 
my $list = $lf->Scrolled(qw/Listbox -selectmode extended -scrollbars ose/);
    
$list->pack(qw/-side left -expand yes -fill both/);
 
$mw->Button(-text => 'Short List', -command => [\&show_short])->pack();
 
$mw->Button(-text => 'Long List',  -command => [\&show_long] )->pack();
 
Tk::MainLoop;
 
sub show_short
{ 
    $list->SetList(qw/Short List/);
 
    $db->Show();
}
 
sub show_long
{
    $list->SetList(qw/Alabama Alaska Arizona Arkansas California Colorado
Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa
Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota
Mississippi Missouri Montana Nebraska Nevada/, 'New Hampshire', 'New
Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', qw/Ohio
Oklahoma Oregon Pennsylvania/, 'Rhode Island', 'South Carolina', 'South
Dakota', qw/Tennessee Texas Utah Vermont Virginia Washington/, 'West
Virginia', 'Wisconsin', 'Wyoming');
 
    $db->Show(); 
}

--++**==--++**==--++**==--++**==--++**==--++**==--++**==
ptk mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/ptk