tcarmeli has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use warnings; use Tk; use Tk::Table; my $graph_width=300; my $graph_height=700; #my $graph_height=800; my $title_c; my $group; my $canvas; my $table; my @group_names=('A','B'); my $col=0; my $graph_win = MainWindow->new( ); $graph_win->withdraw; $table= $graph_win->Table( -rows => 2, -columns => 2, -scrollbars => 'e', -fixedrows => 1, -fixedcolumns => 0 )->pack( -expand => 1, -fill => 'both', ); foreach $group (@group_names){ $title_c=$table->Label( -text => $group, -relief => 'groove', -font => "{Arial} 15 bold", -borderwidth => 2, ); $table->put(0,$col, $title_c); $col++; } $col=0; foreach $group (@group_names){ $canvas = $table->Scrolled("Canvas", -scrollbars => 's', -width => 300, -height => $graph_height, -background => 'white', -borderwidth => 2, -relief => 'groove', -scrollregion => [0,0,$graph_width,$graph_height] ); $table->put(1,$col++, $canvas); } $graph_win->deiconify(); $graph_win->raise(); $graph_win->geometry('1000x800+10+10'); MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with scrolling Tk Table
by zentara (Cardinal) on Apr 25, 2007 at 13:19 UTC | |
by tcarmeli (Beadle) on Apr 25, 2007 at 14:27 UTC | |
by zentara (Cardinal) on Apr 25, 2007 at 17:10 UTC | |
|
Re: Problem with scrolling Tk Table
by mikasue (Friar) on Apr 25, 2007 at 13:41 UTC |