in reply to how to scroll a mainwindow in TK
#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::Pane; my $top = MainWindow->new; $top->geometry("150x300"); my $pane = $top->Scrolled('Pane', -scrollbars => 'oe', # 'osoe' for both bars )->pack(-expand => 'y', -fill => 'both'); for (0 .. 5) { $pane->Button( -text => $_, -width => 15, -command => [sub{print "Button $_[0] Pressed\n"},$_], )->pack; } $top->Button( -text => 'Quit', -command => sub{$top->destroy}, )->pack; MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to scroll a mainwindow in TK
by perligate (Initiate) on Jun 20, 2008 at 21:09 UTC |