Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: TK: adding notebook tabs dynamically

by tachyon (Chancellor)
on Oct 11, 2004 at 03:04 UTC ( [id://398089]=note: print w/replies, xml ) Need Help??


in reply to TK: adding notebook tabs dynamically
in thread TK: adding notebook tabs dynamically

use Tk; use Tk::NoteBook; my $top = MainWindow->new( ); my $nb = $top->NoteBook()->pack(); add_tab(); $top->Button( -text => "Add Tab", -command => \&add_tab )->pack(); $top->Button( -text => "Delete Tab", -command => \&delete_tab )->pack( +); MainLoop(); sub delete_tab { $nb->delete($i--) } sub add_tab { $nb->add(++$i, -label => $i )->pack() }

cheers

tachyon

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 10:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found