开发者

How to add Scrollbar to the Mainwindow using Perl TK

I want to add scroll bar in my main window. How can I add scroll bar in my main win开发者_开发技巧dow. Please help me.


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.


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 );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜