Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I want to add scrollbar to my main window.
I tried by the following code, Please help
my $mw = MainWindow->new( ); $mw->geometry('+793+475'); my $txt = $mw->Scrolled("MainWindow",-width => 50,-scrollbars=>'e')-> +grid(-column=>2,-row=>1); ### my $txt = $mw->Scrolled("Frame",-width => 50,-scrollbars=>'e')-> g +rid(-column=>2,-row=>1); my $frm_name = $mw -> Frame() -> grid(-column=>2,-row=>1); $mw->maxsize(300,200);

Replies are listed 'Best First'.
Re: Add a Scrollbar to the Mainwindow in Perl TK
by lamprecht (Friar) on Apr 03, 2010 at 10:23 UTC
    Hi,

    there is no 'Scrolled' MainWindow. Typically you would use a Scrolled Pane as a container which might cover the whole available space of your MainWindow.

    See
    Tk::Pane
    Tk::Scrolled

    Cheers, Chris