G'day perlynewby,
Some general pointers:
-
Have the Tk documentation open and refer to it often when coding.
-
Check the Widget Demo (type widget on the command line) for code that does the sort of thing you want;
then adapt for your specific needs.
-
Follow the "Clone repository" link and look for code in t/ (test) directories.
This may have something similar to what you need.
-
Avoid monolithic scripts.
Break you code into manageable units (subroutines).
Pass references to variables.
Declaring lexical variables with file scope is (almost) the same as using global variables:
you'll encounter much the same problems.
-
Post multiple questions here, each targeting a specific issue.
You've asked about checkboxes, file browers, emailing, logging and so on:
some people may not have time to answer all;
some may not wish to work through everything and pick out the bits they can answer;
and others may find a huge wall of questions too daunting and just move on.
For your "Formatting challenges" questions,
I suspect your main problem here is the exclusive use of the Tk::pack
geometry manager.
Laying out the frames of your GUI with pack() is often a good way to go.
When lining up widgets within those frames, Tk::grid is possibly a better choice.
See the "Tk Geometry Management" section for other options.
For your other questions, it wasn't clear whether you were asking how to do something
or how to position a widget (e.g. "on right side below checkboxes").
I've provided tentative answers based on "how to do" and not "how to position".
-
"additional pop up check box" — it's unclear what you're looking for here:
pop-up menu?; dialog box?; Tk::Toplevel?; something else?
I'd guess you'd want the -command option of Tk::Checkbutton.
-
"add a file browser button" — see "Common Dialogs" in the Widget Demo.
-
"add a button/code ... to email recipients" — Tk::Button
with the -command option.
-
'add frame ... to allow user to add comments with a title=> "Special Notes"?' —
Tk::LabFrame with -label => 'Special Notes';
Tk::Text for the comments.
Some final notes:
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.