You can get the behavior you want by creating frames and using pack on them and then using grid on the widgets inside of the frames. You have too much code for me to fix this on in your example, so, here is an example that should give you an idea of one way to accomplish what you want.
use Tk;
use Tk::Frame;
use Tk::Button;
my $mw = tkinit(-title, 'PM');
$mw->geometry('100x100+0+0');
my $frame = $mw->Frame()->pack(-anchor, 'nw');
my $frame2 = $mw->Frame()->pack();
#Grid bounded by frame
my $btn1 = $frame->Button( -text, 'B1')->grid( -row, 0, -column, 0);
my $btn2 = $frame->Button( -text,'B2')->grid( -row, 0, -column, 3);
#Grid bounded by main window
my $btn3 = $frame2->Button( -text, 'B3')->grid( -row, 0, -column, 1);
my $btn3_1 = $frame2->Button( -text, 'B3_1')->grid( -row, 0, -column,
+4);
my $btn4 = $frame2->Button( -text, 'B4')->grid( -row, 1, -column, 2);
my $btn5 = $frame2->Button( -text,'B5')->grid( -row, 2, -column, 3);
MainLoop;
Good luck.
JamesNC
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.