Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Tk::TableMatrix hide lines (grid)

by Generoso (Prior)
on Jun 29, 2010 at 21:57 UTC ( [id://847206]=note: print w/replies, xml ) Need Help??


in reply to Tk::TableMatrix hide lines (grid)

Y need to use the option -relief => "flat" and it will show as not having any line between adjacent values,as in the following example

#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::Table; #The key point is that the scroll bars only scroll non-fixed columns. my $mw = MainWindow->new; #$mw->geometry("200x200"); my $x; my $y; my $table = $mw->Table (-rows => 9, -columns => 9, -fixedrows => 9)->pack; foreach my $row (0 .. 8) { foreach my $col (0 .. 8) { my $cell = $table->Entry (-width => 4, -text => "$col, $row" +, -relief => "flat"); $table->put ($row, $col, $cell); $cell->bind('<ButtonPress-1>' => sub{ $x = $col; $y = $row }); } } my $button = $mw->Button(-text => 'Get Current', -command => sub{ print "$x $y\n"; })->pack(); MainLoop; __END__

Replies are listed 'Best First'.
Re^2: Tk::TableMatrix hide lines (grid)
by fanticla (Scribe) on Jul 04, 2010 at 11:20 UTC

    Thank you! It works perfectly!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-24 08:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found