#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::NoteBook; ######### Making the main Window ########## my $mw = MainWindow->new(-title => "Tabbed Window"); $mw->geometry("700x600"); # Create the notebook and fill the whole window my $nb = $mw->NoteBook->pack(-expand => 1, -fill => 'both', ); ####### Create page 1 ########## my $p1 = $nb->add('page1', -label => 'Page 1'); $p1->Button(-text => 'Go to page 2', -command => sub { $nb->pageconfigure('page2', -state => 'normal'); $nb->raise('page2'); }, )->pack; ####### Create page 2 ########## my $p2 = $nb->add('page2', -label => 'Page 2', -state=>'disabled'); MainLoop();