#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::DialogBox; use Tk::Text; use Tk::Pane; my $mw = tkinit; $mw->fontCreate('big', -weight=>'bold', -size=>18); my $d = $mw->DialogBox(-buttons => ["OK", "Cancel"]); my $f = $d->add('Frame')->pack(-expand => 1, -fill => 'both'); my $p = $f->Scrolled('Pane', -scrollbars => 'osoe')->pack( -expand => 1, -fill => 'both', ); my $text = $p->Text(-bg => 'white', -font => 'big', -height => 100, )->pack; for ( 1 .. 100){ $text->insert('end', "$_\n"); } $d->Show;