in reply to Examples for Tk::DynaTabFrame?

You forgot to pack your widgets. The widgets in Tk can be made, but they won't be seen until you pack, place or grid them onto the screen. Additionally, DynaTabFrame dosn't seem to expand a window, so you need to set a default size for the $mw.
#! /usr/bin/perl use strict; use warnings; use Tk; use Tk::DynaTabFrame; my $mw = MainWindow->new(); $mw->geometry('200x200'); my $TabbedFrame = $mw->DynaTabFrame() ->pack(-side => 'top', -expand => 1, -fill => 'both'); my $frame = $TabbedFrame->add( -caption => 'Tab 1', -tabcolor => 'yellow', -hidden => 0 ); my $button = $frame->Button( -text => 'Button 1 on Tab 1' )->pack(); my $frame2 = $TabbedFrame->add( -caption => 'Tab 2', -tabcolor => 'red', -hidden => 0 ); my $button2 = $frame->Button( -text => 'Button 1 on Tab 2' )->pack(); MainLoop();

I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re^2: Examples for Tk::DynaTabFrame?
by Butch (Novice) on Mar 14, 2006 at 09:45 UTC
    Thanks Zentara - that's exactly the help I needed.
    I'll go away and read up on pack \ grid.