Reputation: 2122
I want to add scroll bar in my main window. How can I add scroll bar in my main window. Please help me.
Upvotes: 2
Views: 2068
Reputation: 27183
You can use a Tk::Pane or you can use the Scrolled constructor to create a scrolled Frame or other widget.
my $f = $mw->Scrolled( Frame => @frame_options );
Upvotes: 3
Reputation: 3635
In TK you wouldn't add a scrollbar to the main window, but you create a widget to be scrolled and add scroll bars to scroll it. This is a little complex to do your self so TK has some helpers to make it easier.
TK::Pane can be used to create an empty scrolled container that you can add other widgets to.
Upvotes: 6