Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Tk::NoteBook focus on other page

by choroba (Canon)
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 studying the Monastery: (5)
As of 2015-07-06 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls