here's my code:
use Tk; my $mw = Tk::MainWindow->new; my $fr = $mw->Frame(-label=>"myframe"); my $l1 = $fr->Label(-text=>"label1"); my $l2 = $fr->Label(-text=>"label2"); $fr->grid; $l1->grid; $l2->grid; MainLoop;
Running that ends up in a freeze (and 100% cpu load).
But this is not about competing layout managers, at least not explicitly.
Exchanging all grid calls to pack makes the application run as expected.
Making the labels direct daughters of the main window (as in the examples in those tutorials) also works fine.
It's not about grids arguments: I tried a lot of variations, no chance.
My question: How can I layout a set of widgets within a frame using grid ?
I'd like to use the $widget->grid(-row=>2,-column=>3)-style of using grid.

thanks for any hint !

In reply to Tk grid in a Frame => freeze by leonardo-vittorio

Title:
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, 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:
    & &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.