in reply to Re: -scrollbars is unknown option in windowCreate
in thread -scrollbars is unknown option in windowCreate
I have found an acceptable workaround for the problem. By using Tk::Pane the entire main window is scrollable and the scrollbars inside the ROText widget are still functional. The downside is that the widgets at the top of my window also scroll out of view. Since the main focus of the window is the long list of items I can live with this.
#! /usr/bin/perl -w use Tk; use Tk::Pane; require Tk::ROText; my $mw = MainWindow->new; $pane = $mw->Scrolled(Pane, -scrollbars => 'ow', -sticky => 'nswe', -gridded => 'y', -height => '800' ); $pane->Frame(); $pane->grid; $pos1 = $pane->ROText(-height => 7, -width => 20, -wrap => 'word')->gr +id ( $pos2 = $pane->ROText(-height => 7, -width => 20, -wrap => 'word +'), $pos3 = $pane->Scrolled('ROText', -height =>7, -width => 20, -wrap + => 'word', -scrollbars => 'oe'), $pane->Label(-height => 100, -width => 100,-text => "Photo" ), $pane->Button(-text => "Link"), -sticky => "nsew"); $pos1->tagConfigure('bold', -font => "Courier 10 bold", -justify => " +center", -spacing1 => 50); $pos2->tagConfigure('bold', -font => "Courier 10 bold", -justify => " +center", -spacing1 => 30); $pos1->insert('end', "Evening Gown", 'bold'); $pos2->insert('end', "Blue and black formal dress", 'bold'); $pos3->insert('end', " [Long description] "); MainLoop;
|
|---|