Mega Code Archive

 
Categories / Perl / GUI
 

Use the Scrolled to control the scroll of a Text Entry

use Tk; my $main = MainWindow->new; my $entry1 = $main->Entry->pack; my $entry2 = $main->Scrolled(     Entry,     -relief => 'sunken',     -scrollbars => 's' )->pack; $entry1->insert(     0,     'Here is some long text that you have to scroll to see.' ); $entry2->insert(     0,     'Here is some long text that you have to scroll to see.' ); MainLoop;