[sf-perl] Tk

Lemseffer. Tahar (SDA) lemseffert at sacsewer.com
Tue Aug 31 08:32:47 PDT 2010


Hello Garth,

Here is my Tk code, but I'm running some issue here..

Error: can't locate TK/TableMAtrix/Spreedsheet.pm

 

Any idea why?

#!/usr/local/bin/perl -w

Use strict;

use Tk; 
use Tk::TableMatrix::Spreadsheet; 
$mw = MainWindow->new; 
$mw->configure(-title=>'Testing'); 
$mw->minsize(qw(500 200)); 
$menu = $mw->Frame()->pack(-side=>'top',-fill=>'x'); 
$menu_file = 
$menu->Menubutton(-text=>'File', 
 -tearoff=>'false' 
)->pack(-side=>'left'); 
$menu_file->command(-label=>'Exit',-command=>sub{$mw->destroy}); 
$frame = 
$mw->Frame(-height=>'10', 
 -width=>'30', 
 -relief=>'groove', 
 -borderwidth=>'3' 
)->pack(-fill=>'x',-pady=>'0'); 
@border = (0,0,0,1); 
$arrayVar->{"0,0"} = "%"; 
$arrayVar->{"0,1"} = "Artist"; 
$arrayVar->{"0,2"} = "Album"; 
$arrayVar->{"0,3"} = "Year"; 
$arrayVar->{"0,4"} = "Genre"; 
$table = $frame->Scrolled('Spreadsheet', 
 -cols => 5, 
 -width => 5, 
-height => 6, 
 -titlerows => 1, 
 -variable => $arrayVar, 
 -selectmode => 'multiple', 
 -selectmode => 'extended', 
 -selecttype => 'row', 
 -resizeborders => 'col', 
 -bg => 'white', 
 -rowheight => 2, 
 -bd => \@border, 
 -justify => 'left', 
 -drawmode => 'compatible', 
 -wrap => 0, 
 -relief => 'solid' 
)->pack(-fill=>'both'); 
$table->rowHeight(0,1); 
$table->tagRow('title',0); 
$table->tagConfigure('title', -bd=>2, -relief=>'raised'); 
$table->colWidth(0,5,3,6,4,10); 
#$table->selectionAnchor('topleft'); 
$table->activate("1,0"); 
MainLoop(); 

 

 

From: sanfrancisco-pm-bounces+lemseffert=sacsewer.com at pm.org
[mailto:sanfrancisco-pm-bounces+lemseffert=sacsewer.com at pm.org] On
Behalf Of Garth Webb
Sent: Friday, August 27, 2010 1:54 PM
To: San Francisco Perl Mongers User Group
Subject: Re: [sf-perl] Tk

 

Yes that is possible to do with Perl/Tk. I googled Perl/TK found a few
tutorials that will help you get started:

 

http://www.bin-co.com/perl/perl_tk_tutorial/
<http://www.bin-co.com/perl/perl_tk_tutorial/> 

http://www.lehigh.edu/~sol0/ptk/perlmonth01/pm1.html
<http://www.lehigh.edu/~sol0/ptk/perlmonth01/pm1.html> 

 

and of course the POD for TK itself:

 

http://search.cpan.org/~ni-s/Tk-804.027/pod/UserGuide.pod
<http://search.cpan.org/~ni-s/Tk-804.027/pod/UserGuide.pod> 

 

HTH

 

Garth

 

On Fri, Aug 27, 2010 at 1:36 PM, Lemseffer. Tahar (SDA)
<lemseffert at sacsewer.com> wrote:

That is true the worst that can happen is you say "i dunno".
Ok here is my little delima.
I want to create a Table with the fields: Point Name, Point Description,
Point Status, and comments field.
I want to be able to enter it Point Name ..etc manually into the table.

Any help will be appreciated
Thank you
T


-----Original Message-----
From: Joe Brenner [mailto:doom at kzsu.stanford.edu]
Sent: Friday, August 27, 2010 1:31 PM
To: Lemseffer. Tahar (SDA)
Cc: San Francisco Perl Mongers User Group
Subject: Tk


Lemseffer. Tahar (SDA) <lemseffert at sacsewer.com> wrote:

> Good Afternoon All,
> Is anyone familiar with TK?

I wouldn't say "familiar", but I used it a while back. Feel free to hit
us with your question, the worst that can happen is we say "i dunno".

________________________________________________________________________
____
EMAIL DISCLAIMER:
This email and any attachments thereto may contain private,
confidential, and
privileged material for the sole use of the intended recipient. Any
review,
copying, or distribution of this email (or any attachments thereto) by
other
than the intended recipient is strictly prohibited.

If you are not the intended recipient, please contact the sender
immediately
and permanently delete the original and any copies of this email and any
attachments thereto.
________________________________________________________________________
_____


_______________________________________________
SanFrancisco-pm mailing list
SanFrancisco-pm at pm.org
http://mail.pm.org/mailman/listinfo/sanfrancisco-pm

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20100831/47b86b96/attachment.html>


More information about the SanFrancisco-pm mailing list