programming-examples/perl/GUI/Use the Scrolled to control the scroll of a Text Entry.pl

22 lines
378 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
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;