Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Tk::Table and optional scrollbar

by Khen1950fx (Canon)
on Jul 26, 2012 at 21:35 UTC ( #983941=note: print w/ replies, xml ) Need Help??


in reply to Tk::Table and optional scrollbar

Try this:

#!/usr/bin/perl use strict; use autodie; use warnings; use Tk; use Tk::Table; my $cols = 6; my $rows = 10; my $mw = new MainWindow(); my $frame = $mw->Frame()->pack; my $table = $frame->Table( -columns => $cols, -scrollbars => 'oe', -rows => $rows + 1, -fixedrows => 10 + 1, -fixedcolumns => 10, -relief => 'raised', ); for my $c ( 1 .. $cols ) { my $tmp = $table->Label( -text => 'Row ' . $c, -width => 6, -relief => 'raised', ); $table->put( 0, $c, $tmp ); } for my $r ( 1 .. $rows ) { for my $c ( 1 .. $cols ) { my $tmp = $table->Label( -text => $r . ',' . $c, -padx => 2, -anchor => 'w', -background => 'white', -relief => 'groove', ); $table->put( $r, $c, $tmp ); } } $table->pack( -expand => 'yes', -fill => 'both' ); MainLoop();


Comment on Re: Tk::Table and optional scrollbar
Download Code
Re^2: Tk::Table and optional scrollbar
by Anonymous Monk on Jul 26, 2012 at 22:28 UTC

    Try this:

    Why? It doesn't show any scrollbars at all, no matter how you resize the window

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://983941]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (15)
As of 2014-09-30 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (375 votes), past polls