http://www.perlmonks.org?node_id=1026130


in reply to Tk::NoteBook focus on other page

Everything you need can be found in the documentation of Tk::NoteBook. Check the following sample:
#!/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 => 'nor +mal'); $nb->raise('page2'); }, )->pack; ####### Create page 2 ########## my $p2 = $nb->add('page2', -label => 'Page 2', -state=>'disabled'); MainLoop();
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ