There are a few different ways to precisely position a widget in Tk. One would be to use a Canvas widget and then place all other widgets on that, but this is top-heavy. One would be to use the Pack geometry manager and very specifically tell each Pack method call how tall and wide to make each widget. Another would be to use the Grid geometry manager. Finally, there is Tk::place, which allows for fairly simple, yet exact control over widget size and placement. This one would be ideal if exactness is called for. But most of us use the Pack geometry manager because it helps us by appropriately sizing widgets based on contents and context.
You have some pretty good documentation available already in the form of the
widget demo (just type
widget on a command line to run it), then there's
perldoc Tk::Pack; perldoc Tk::Grid; perldoc Tk::place.
To your second question: I've never thought a GUI builder for Tk to be that needed, but
guido may fit the bill. It might be alpha-quality though, but it's a start. Being written in Perl/Tk it might offer some hints about good Perl/Tk programming, though.
The book
"Mastering Perl/Tk" is probably the book to get. Short of buying the book you could always
download the code samples the book first.
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.