Hello Loops,

      Thanks a lot for your swift response and insight. I also read through another response from AM. Just to make sure I understand this correctly,
  1. A parent/child hierarchy is established at the creation phase of objects. For ex:
    my $t_button = $mw->Button(-text=>'OK', -command=>sub{exit});
    This makes the object pointed to by $t_button a child of the object pointed to by $mw.

  2. A master/slave hierarchy is established by the geometry manager used(such as grid, pack, form, place).

  3. When displaying a widget, if the -in option is not at all used then the master/slave hierarchy is exactly the same as parent/child hierarchy.

If this understanding of mine is correct, then I proceed to a portion of your next statement:
Moving on...Yes, after you said that making button a child of main window, I tried it and it works. But if I change the button to be a child of NoteBook i.e.
my $t_button = $nb->Button(-text=>'OK', -command=>sub{exit});
Then not only does the button not show up, I don't get any error from the execution of pack statement inside the callbacks either when the callbacks are executed. What's going on ? Can you please tell me what's the problem here?

Hey, Thank you for your patience in reading my query.

In reply to Re^2: Usefulness of -in option in Geometry Management (Perl/Tk) by Anonymous Monk
in thread Usefulness of -in option in Geometry Management (Perl/Tk) by Anonymous Monk

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.