Attached is an example script that demonstrates the problem.
[guest - Thu Feb 24 11:57:45 2005]:
Show quoted text> I am using the Tk build that comes with ActiveState Perl v5.8.6 build
> 811. The Tk version is 804.027. I am using Tk-DKW 0.03, also provided
> by ActiveState. My OS is Windows 2000 Professional.
>
> After filling a Tk::Columns object with rows using ->insert, the
> scrollbars do not update. If the number of rows is more than what can
> be displayed on the screen, there is no way to scroll down.
>
> (Well actually you can click a row near the bottom of the screen and
> drag down to scroll. Once that happens, the scroll bar updates
> correctly. But that is VERY user unfriendly.)
>
> This seems to be a windows specific problem, the scrollbars work
> correctly when running my script under Linux.
#!/usr/bin/perl -w
use strict;
#
# Here is an example script of Tk::Columns scrollbars not updating properly.
# This happens on Win32. On Linux the scrollbars seem to work, although they update slowly at times.
#
use Tk;
use Tk::Columns;
my $Main = MainWindow->new();
$Main->title('Tk::Columns scrolling bug demo');
$Main->minsize(qw(500 200));
my $Columns = $Main->Columns()->pack(-expand=>'true', -fill=>'x');
$Columns->ColumnButton(-text=>'Column 1', -width=>30);
$Columns->ColumnButton(-text=>'Column 2', -width=>30);
my $Button = $Main->Button(-text=>'Load Data', -command=>\&load_data)->pack;
MainLoop();
sub load_data
{
foreach my $List ($Columns->lists())
{
$List->delete(0, 'end');
}
$Main->update;
for (my $RowNum = 1; $RowNum <= 50; $RowNum++)
{
$Columns->insert('end', "Cell $RowNum, 1", "Cell $RowNum, 2");
}
$Main->update;
}