use Tk; use Tk::Pane; use Tk::NoteBook; my $mainwindow = MainWindow->new(); my $controller_tabs; my $scroll = 0; $mainwindow->repeat(3000, sub { if ($scroll) { $controller_tabs->raise($controller_tabs->info("focusnext")); } }); $controller_tabs = $mainwindow->NoteBook(-dynamicgeometry=>1)->pack(-side=>"top"); $mainwindow->Checkbutton(-text=>"Monitor Controllers", -variable=>\$scroll, -onvalue=>1, -offvalue=>0)->pack(-side=>"top"); for (my $x = 0; $x < 5; $x++) { $controller_tabs->add("tab$x", -label=>"tab$x"); } MainLoop();