# Create a top-level window that displays a bunch of entries with
# tabs set up to move between them.
-text
=> 'This window contains a simple form where you can type in the various entries and use tabs to move circularly between the entries.',
-title
=> 'Form Demonstration',
my $f = $TOP->Frame->pack(-fill
=> 'both');
foreach ('Name:', 'Address:', '', '', 'Phone:') {
my $e = $f->Entry(qw
/-relief sunken -width 40/);
my $l = $f->Label(-text
=> $_, -anchor
=> 'e', -justify
=> 'right');
Tk
::grid
( $l, -row
=> $row, -column
=> 0, -sticky
=> 'e');
Tk
::grid
( $e, -row
=> $row++, -column
=> 1,-sticky
=> 'ew');
$f->gridRowconfigure(1,-weight
=> 1);
$e->focus if $_ eq 'Name:';
$TOP->bind('<Return>' => [$TOP => 'destroy']);