开发者

How to add Scrollbar to the Mainwindow using Perl TK

开发者 https://www.devze.com 2022-12-25 18:55 出处:网络
I want to add scroll bar in my main window. How can I add scroll bar in my main win开发者_开发技巧dow. Pleasehelp me. In TK you wouldn\'t add a scrollbar to the main window, but you create a widget to

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

精彩评论

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