http://cpansearch.perl.org/src/LGODDARD/Tk-Wizard-2.151/lib/Tk/Wizard.pm sub addTextFramePage { my ($self, $args) = (shift, {@_}); DEBUG "addTextFramePage args are ", Dumper($args); return $self->addPage( sub { $self->_text_frame($args) } ); } sub _text_frame { my $self = shift; my $args = shift; DEBUG "Enter _text_frame with ", Dumper($args); my $text; my $frame = $self->blank_frame(%$args); if ( $args->{-boxedtext} ) { if ( ref $args->{-boxedtext} eq 'SCALAR' ) { $text = $args->{-boxedtext}; } elsif ( not ref $args->{-boxedtext} ) { open my $in, $args->{-boxedtext} or Carp::croak "Could not read file: $args->{-boxedtext}; $!"; read $in, $$text, -s $in; close $in; WARN "Boxedtext file $args->{-boxedtext} is empty." if not length $text; } } $$text = "" if not defined $text; my $t = $frame->Scrolled( "ROText", -background => ( $args->{ -background } || 'white' ), -relief => "sunken", -borderwidth => "1", -font => $self->{defaultFont}, -scrollbars => "osoe", -wrap => "word", )->pack(qw/-expand 1 -fill both -padx 10 -pady 10/); $t->configure( -background => 'green' ) if DEBUG_FRAME; $t->insert( '0.0', $$text ); $t->configure( -state => "disabled" ); return $frame; }