Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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 Tk-EasyGUI.pm 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

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2024-04-24 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found