The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tk::CollapsableFrame - a Frame that opens and closes via a mouse click.

SYNOPSIS

 $cf = $parent->CollapsableFrame>(-option => value);

DESCRIPTION

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

Title of the CollapsableFrame widget.

-height

The maximun open height of the CollapsableFrame.

METHODS

close

Closes the CollapsableFrame.

open

Opens the CollapsableFrame.

state

Returns the open/close state of the CollapsableFrame, either "open" or "close".

toggle

Toggles the open/close state of the CollapsableFrame.

ADVERTISED WIDGETS

Component subwidgets can be accessed via the Subwidget method. Valid subwidget names are listed below.

Name: colf, Class: Frame
  Widget reference of the internal Frame widget within which user
  widgets are managed.

EXAMPLE

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

AUTHOR and COPYRIGHT

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.

KEYWORDS

CollapsableFrame, Frame, Pane