Tk tips :)
perl Tk help, RFC: Learning Perl/Tk, Perl/Tk: For Beginners, Re^3: Tkx Search for dialog box for text input , Re: TclTk interface with Perl code, is it possible? , Re^2: GUI toolkit+designer for the perl newbie , Re: Easier GUI, Re: Should I use Perl/TK?, Re^2: need a popup gui stdin, Tk Tree Tutorial ( http://www.rtapo.com/tutorials/tk_tree.html ), some Tkx tutorial links, Tutorial http://theoryx5.uwinnipeg.ca/perltk/ and http://www.perl.com/pub/1999/10/perltk/, http://perltk.org/, http://web.archive.org/web/20100310202528/http://theoryx5.uwinnipeg.ca/perltk/, How to RTFM Tk Tutorials
#!/usr/bin/perl -- use strict; use warnings; use Tk; Main( @ARGV ); exit( 0 ); sub Main { return MainTk( @_ ); } sub MainTk { my $mw = Tk::MainWindow->new( -title => "Log Viewer", ); $mw->Label( -text => "DEVICE:" )->grid( -column => 1, -row => 1, -sticky => "e", -padx => 5, -pady => 5, ); $mw->Label( -text => "START TIME:" )->grid( -column => 1, -row => 2, -sticky => "e", -padx => 5, -pady => 5, ); $mw->Label( -text => "END TIME:" )->grid( -column => 3, -row => 2, -sticky => "e", -padx => 5, -pady => 5, ); $mw->Label( -text => "VALUE" )->grid( -column => 1, -row => 3, -sticky => "e", -padx => 5, -pady => 5, ); my( $device, $stime, $etime, $value ) = 1 .. 10; $mw->Entry( -width => 14, -textvariable => \$device, )->grid( -column => 2, -row => 1, -sticky => "we", -padx => 5, -pady => 5, ); $mw->Entry( -width => 10, -textvariable => \$stime, )->grid( -column => 2, -row => 2, -sticky => "we", -padx => 5, -pady => 5, ); $mw->Entry( -width => 10, -textvariable => \$etime )->grid( -column => 4, -row => 2, -sticky => "we", -padx => 5, -pady => 5, ); $mw->Entry( -width => 50, -textvariable => \$value, )->grid( -column => 2, -row => 3, -columnspan => 3, -sticky => "we", -padx => 5, -pady => 5 ); #~ $mw->Button( -text => "RUN", -command => [ \&onRun, \$etime, \$ +stime, \$value, \$device ] )->grid( my $onRun = sub { print "$etime $stime $value $device\n"; }; $mw->Button( -text => "RUN", -command => $onRun, )->grid( -column => 1, -row => 5, -columnspan => 4, -sticky => "we", -padx => 5, -pady => 5, ); $mw->MainLoop; } ## end sub MainTk sub onRun { my( $etimeref , $stimeref, $valueref, $deviceref ) = @_; use Data::Dump qw/ dd /; dd( { map {; "$_" => "$$_" ;} @_ }); } ## end sub onRun
In reply to Re: text parser TkGUI ActiveState
by Anonymous Monk
in thread text parser TkGUI ActiveState
by jasonwolf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |