Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Tk ASCII Table

by mawe (Hermit)
on Jun 10, 2005 at 20:07 UTC ( [id://465664]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Tk ASCII Table
in thread Tk ASCII Table

Hi!

Here's a version with scrollbars:

use strict; use warnings; use Tk; my $columns_per_row = 12; sub ASCII_Buttons { my $root = MainWindow->new(); $root->title('MMG Server Options'); my $frame = $root->Scrolled('Frame', -width=>600,-height=>400)->pack(-fill=>'both', -expand=>1); my ($row,$col) = (1,1); for my $character (0..255) { my $label = sprintf("[%03d][%s]", $character, chr($character)) +; $frame->Button( -text=>$label, -font => '-*-Lucida Console-Bold-R-Normal-*-*-160-*-*- +*-*-*-*', )->grid(-row=>$row,-column=>$col,-sticky=>'nswe'); if ($col>=$columns_per_row) {$row++;$col=0} $col++; } } ASCII_Buttons(); MainLoop;

Regards, mawe

Replies are listed 'Best First'.
Re^4: Tk ASCII Table
by NateTut (Deacon) on Jun 12, 2005 at 13:12 UTC
    Hmm... Your scrollbars don't work for me. I'm using Perl 5.8.3 on WIndoze ME. I have created scrolled objects before (i.e. text & TableMatrix) but I have never gotten a frame to scroll.

    Weird.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-25 21:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found