Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I sometimes need a quick and dirty Tk GUI for some off-hand project. Having gotten tired of writting anew or doing without a GUI, I cobbled together a package for banging them out quick an dirty. Once I got started I also realized that I similarly tire of writing validity-checking routines. So I wed the two tiresome chores together. I call it Easy GUI for lack of a better imagination.

It only does two things: A) Create columns of label/entry widgets; B) Create rows of button widgets. But this is not so limiting as you might think.

ENTRY: Entry widgets may contain paths, strings, integers, reals or lists, all self-verifying. Those for paths are auto-supplied with browse buttons.

BUTTON: Button widgets may be single- or double-click (toggle) type. Toggle-buttons may have two actions.

CHECKING: You can do all of the following:

  • Match strings to a RegEx.
  • Limit the range of integers and real numbers.
  • Limit resolution of reals.
  • Pose the above two limits on lists of either.

Optionally, you can further impose that:

  • None pass through if any should fail.
  • All roll back if any should fail.

Configuration is brain-dead simple. All you do is flag what's to go in each entry by a text string so that the validity routines know how to check them.

Here's a link to both my module and my complete, stand-alone, example script. I've tested them on WinXP and NetBSD 2.0.2. The license is our dear, old Perl artistic license. So do with it whatever you wish. Included therein is also ample documentation, POD sufficient to serve even the rankest Perl newbie.

Fullly Documented Here

PS - I'm uncertain whether this module is ready for or even worthy of uploading to CPAN. Besides the original development-use-only script, I have since employed it in a few other places. All those are linked to in the documentation page. Kindly inform me whether you find it useful or a needless frill. Thanks.

In reply to Quick and Dirty Perl/Tk GUI by aplonis

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    Domain Nodelet?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others romping around the Monastery: (4)
    As of 2024-07-15 14:29 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found

      erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.