Subject: | Bug in Tk::TableMatrix 1.01 spans method |
I am using Tk::TableMatrix 1.01 with ActiveState perl 5.6.1 build 633 for MSWin32 with Tk 800.023.
I wish to produce a 2 row, 2 column table with row 0 as the title
row and row 1 as having both columns spanned with some text. I can get the spans to work properly if I define a 3 row, 2 column table. Here's what it should look like if the 3rd row weren't necessary. I've shown row numbers (offsets, actually) for clarity.
0 Id Value
1 Nothing selected
If I tell the widget that it has 2 rows, then this is what I see
0 Id
1
If I tell the widget that it has 3 rows, then this is what I see
0 Id Value
1 Nothing selected
2
I execute the two examples with:
perl t.pl 2
perl t.pl 3
Here's the code
use Tk;
use Tk::TableMatrix;
my $top = MainWindow->new;
my $v = {};
my $t = $top->Scrolled('TableMatrix', -rows=>$ARGV[0], -cols=>2, -variable=>$v, -titlerows=>1);
$v->{"0,0"} = "Id";
$v->{"0,1"} = "Value";
$v->{"1,0"} = "Nothing selected";
$t->spans('1,0'=>'0,1');
$t->pack(-expand=>1, -fill=>'both');
Tk::MainLoop;