Tips Re: Tk::Notebook - Scrolling Tabs (diy)
Example
#!/usr/bin/perl -- use strict; use warnings; use Tk; Main( @ARGV ); exit( 0 ); sub Main { my $mw = tkinit(); my $nb = $mw->NoteBook( -backpagecolor => 'red',)->pack(qw/-expand + 1 -fill both /); Colors($nb); $mw->geometry("200x200+200+200"); ## $mw->WidgetDump; $mw->MainLoop; } sub Colors { my( $nb ) = @_; my @color = qw[ pink maroon green OliveDrab4 PaleVioletRed3 RosyBr +own2 PeachPuff4 WhiteSmoke azure3 chartreuse1 coral3 gold1 firebrick4 + linen salmon4 tomato2 ]; for my $red( @color ){ my $frame = $nb->add( $red, -label => $red, ); my $emraf = $frame->Scrolled('Pane', -background => $red)->pac +k(qw/ -expand 1 -fill both /); $emraf->Button( -text => $_, )->pack( -side => (qw/ left right + top bottom/)[rand 4] ) for @color; } }
In reply to Re^3: How to set the MainWindow agile to the context in Perl/Tk
by Anonymous Monk
in thread How to set the MainWindow agile to the context in Perl/Tk
by Janish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |