Tk::CollapsableFrame - a Frame that opens and closes via a mouse click.
$cf = $parent->CollapsableFrame>(-option => value);
This widget provides a switchable open or closed Frame that provides for the vertical arrangement of widget controls. This is an alternative to Notebook style tabbed widgets.
The following option/value pairs are supported:
Title of the CollapsableFrame widget.
The maximun open height of the CollapsableFrame.
Closes the CollapsableFrame.
Opens the CollapsableFrame.
Returns the open/close state of the CollapsableFrame, either "open" or "close".
Toggles the open/close state of the CollapsableFrame.
Component subwidgets can be accessed via the Subwidget method. Valid subwidget names are listed below.
Widget reference of the internal Frame widget within which user widgets are managed.
use Tk::widgets qw/CollapsableFrame Pane/; my $mw = MainWindow->new; my $pane = $mw->Scrolled( qw/Pane -width 250 -height 50 -scrollbars osow -sticky nw/, )->pack; my $cf = $pane->CollapsableFrame(-title => 'Frame1 ', -height => 50); $cf->pack(qw/-fill x -expand 1/); $cf->toggle; my $colf = $cf->Subwidget('colf'); my $but = $colf->Button(-text => 'Close Frame 1!'); $but->pack; $but->bind('<Button-1>' => [sub {$_[1]->close}, $cf]);
Stephen.O.Lidie@Lehigh.EDU, 2000/11/27.
Copyright (C) 2000 - 2003, Stephen O. Lidie.
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
Based on the Tck/Tk CollapsableFrame widget by William J Giddings.
CollapsableFrame, Frame, Pane
To install Tk::CollapsableFrame, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tk::CollapsableFrame
CPAN shell
perl -MCPAN -e shell install Tk::CollapsableFrame
For more information on module installation, please visit the detailed CPAN module installation guide.