in reply to How can I get indefinite scroll to work in a TK text widget
Bad title. Bad title!
That said - It Works For Me TM.
use Tk; $bottomFrame = MainWindow->new(); sub display_text { my $txt_summary = $bottomFrame->Scrolled( "Text", -background => 'blue', -foreground => 'white', -height => '1', -takefocus => '0', -width => '40', -scrollbars => 'oe', )->pack(qw(-fill both -ex +pand 1)); open(FH, "cuentos.txt") || die "no Abrio nada"; while (<FH>) { $txt_summary -> Insert($_); } close (FH); $txt_summary->see('end'); return $txt_summary; } display_text(); MainLoop; __END__
Maybe it's context? is it the missing arguments to pack()? what kind of object is $bottomFrame actually? Also, "text" ought to be "Text".
thanks to roboticus for the inspired title--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can I get indefinite scroll to work in a TK text widget
by padawan_linuxero (Scribe) on May 16, 2008 at 17:31 UTC | |
by shmem (Chancellor) on May 16, 2008 at 17:50 UTC | |
by padawan_linuxero (Scribe) on May 16, 2008 at 18:05 UTC | |
by TGI (Parson) on May 17, 2008 at 01:06 UTC |