Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Tk::NoteBook focus on other page

by choroba (Abbot)
on Mar 29, 2013 at 10:57 UTC ( #1026130=note: print w/ replies, xml ) Need Help??


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();
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: Tk::NoteBook focus on other page
Download Code
Re^2: Tk::NoteBook focus on other page
by jerre_111 (Sexton) on Mar 29, 2013 at 11:02 UTC

    Must have overlooked it in the documentation.

    Anyway, Thanks for your reply man (or women ;-) )!

    Works like a champ.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1026130]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2014-09-23 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (208 votes), past polls