Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This means,-in => *$master* insert the slave(s) at the end of the packing order for the master window.
use strict; use Tk; use Tk::NoteBook; my $mw = MainWindow->new; $mw->geometry('100x200'); my $nb = $mw->NoteBook()->pack(-fill => 'both', -expand => 1); my $page_tab_01=$nb->add ("TAB-1", -label=>'TAB-1', -raisecmd=>\&callback_01); my $page_tab_02=$nb->add ("TAB-2", -label=>'TAB-2', -raisecmd=>\&callback_02); my $t_button = $page_tab_01->Button(-text=>'OK', -command=>sub{exit}); MainLoop; sub callback_01 { $t_button->packForget; $t_button->pack(-in=>$page_tab_01); } sub callback_02 { $t_button->packForget; $t_button->pack(-in=>$page_tab_02); #<---ERROR HERE }
error:can't pack .notebook.tAB_1.button inside .notebook.tAB_2
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Usefulness of -in option in Geometry Management (Perl/Tk)
by Loops (Curate) on Nov 24, 2014 at 09:06 UTC | |
by Anonymous Monk on Nov 24, 2014 at 18:56 UTC | |
by Anonymous Monk on Nov 27, 2014 at 03:48 UTC | |
|
Re: Usefulness of -in option in Geometry Management (Perl/Tk)
by Anonymous Monk on Nov 24, 2014 at 10:26 UTC |