So I'm trying to accomplish two things with a Tk::Notebook. First I would like to be able to change the order of the tabs. I have reviewed the source but I could not see a way to do it. Second I have a check box to enable/disable auto scrolling between all the tabs and while doing this I want any action taken within the notebook to set '$scroll' to 0. Thank you for your time.
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(-s +ide=>"top"); $mainwindow->Checkbutton(-text=>"Monitor Controllers", -variable=>\$sc +roll, -onvalue=>1, -offvalue=>0)->pack(-side=>"top"); for (my $x = 0; $x < 5; $x++) { $controller_tabs->add("tab$x", -label=>"tab$x"); } MainLoop();
In reply to Tk-Notebook tabs by glenn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |