in reply to Perl/tk - how to handle screen transitions - can I destroy the main window?

Currently, I'm using Tk::Notebook for this kind of thing, and I used this little hack to remove the tabs at the top of the notebook:

# at the top of the program, after loading Tk::Notebook sub Tk::NoteBook::InitTabSize { my $nb = shift; $nb->{'pad-x1'} = 0; $nb->{'pad-x2'} = 0; $nb->{'pad-y1'} = 0; $nb->{'pad-y2'} = 0; $nb->{'minW'} = 0; $nb->{'minH'} = 0; }
It's a pretty ugly hack, but it works like a charm. No multiple mainloops or anything like that needed, you just do $notebook->add() to add "screens" and $notebook->raise($name_of_screen) to raise the screen you want.

  • Comment on Re: Perl/tk - how to handle screen transitions - can I destroy the main window?
  • Download Code

Replies are listed 'Best First'.
Re^2: Perl/tk - how to handle screen transitions - can I destroy the main window?
by Anonymous Monk on Mar 29, 2008 at 14:10 UTC
    that is just wrong (for so many reasons)