Step 1) use Tk, Tkx is a headache,

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.