FireBird34 has asked for the wisdom of the Perl Monks concerning the following question:

I hate to bring VB into this, but it uses it so nicely =P Tabs... Is there a way with pTk to create a menu tab? Not like a regular menu, where you click a scroll down, select what you need, etc... but moreso a 'tab' where you click it, and your moved to a new window, that overlaps the same window (without opening a new one, or shutting down the existing one)?

If this doesn't make sense, I'll take a snapshot of a VB example to show what I need.

edited: Fri May 2 16:10:14 2003 by jeffa - changed title (was: pTk: Creating a 'tab')

Replies are listed 'Best First'.
Re: Perl/Tk: Tabbed Windows?
by Chmrr (Vicar) on May 01, 2003 at 03:52 UTC

    You want a Tk::TabFrame, or, more canonically, a Tk::NoteBook.

    With Tk::NoteBook, create and pack a new Tk::NoteBook object (call it, say, $nb). Thereafter, calling $nb->add("Tab name") will return a new Pane which you can pack widgets into.

    I've necer used Tk::TabFrame, but it would seem to be the same concept.

    perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'