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, - 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.
- A master/slave hierarchy is established by the geometry manager used(such as grid, pack, form, place).
- 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: -
....trying to repack a button with first tab parent into a second tab, changes the geometry...
This, I believe, you meant that the pack geometry manager attempts to pack first tab inside the second tab of the same NoteBook. This of-course is not permitted, after all every tab of any given NoteBook must NOT ONLY be a direct child BUT ALSO a direct slave under that NoteBook
-
...but not the parent/child relationship -- meaning the stacking wouldn't work.
This I didn't understand, honestly. So please let me know.
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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|