use strict; use Tk; use Tk::NoteBook; my $mw = MainWindow->new(); $mw->geometry("600x600+50+50"); $mw->resizable(0, 0); $mw->Button(-command => \&menu_file_new, -text => "Neue Seite")->pack(); # NoteBook erstellen: my $notebook = $mw->NoteBook()->place(-x => 5, -y => 150, -width => 590, -height => 445); my $pagecounter = 0; MainLoop(); sub menu_file_new { # Create new Notebook: my $nr = ++$pagecounter; my $nbpage = $notebook->add("nb$nr", -label => "Test $nr"); $nbpage->Label(-text => "test it $nr")->pack(); }