home *** CD-ROM | disk | FTP | other *** search
Wrap
<HTML> <HEAD> <TITLE>Tk::LabFrame - labeled frame.</TITLE> <LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css"> <LINK REV="made" HREF="mailto:"> </HEAD> <BODY> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%> <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc"> <STRONG><P CLASS=block> Tk::LabFrame - labeled frame.</P></STRONG> </TD></TR> </TABLE> <A NAME="__index__"></A> <!-- INDEX BEGIN --> <UL> <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI> <LI><A HREF="#synopsis">SYNOPSIS</A></LI> <LI><A HREF="#description">DESCRIPTION</A></LI> <LI><A HREF="#widgetoptions">WIDGET-OPTIONS</A></LI> <LI><A HREF="#example">EXAMPLE</A></LI> <LI><A HREF="#bugs">BUGS</A></LI> <LI><A HREF="#author">AUTHOR</A></LI> </UL> <!-- INDEX END --> <HR> <P> <H1><A NAME="name">NAME</A></H1> <P>Tk::LabFrame - labeled frame.</P> <P> <HR> <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1> <UL> <LI>Linux</LI> <LI>Solaris</LI> <LI>Windows</LI> </UL> <HR> <H1><A NAME="synopsis">SYNOPSIS</A></H1> <P> <STRONG>use Tk::LabFrame;</STRONG></P> <P> <EM>$f</EM> = <EM>$parent</EM>-><STRONG>LabFrame</STRONG>(?<STRONG>-label</STRONG>=><EM>text</EM>, <STRONG>-labelside</STRONG>=><EM>where</EM>, ...?);</P> <P> <HR> <H1><A NAME="description">DESCRIPTION</A></H1> <P><STRONG>LabFrame</STRONG> is exactly like <STRONG>Frame</STRONG> and additionaly allows to add a label to the frame.</P> <P> <HR> <H1><A NAME="widgetoptions">WIDGET-OPTIONS</A></H1> <P><STRONG>LabFrame</STRONG> supports the same options as the <A HREF="../../../site/lib/Tk/Frame.html#standard options">Frame</A> widget.</P> <P>Additional options of <STRONG>LabFrame</STRONG> are:</P> <DL> <DT><STRONG><A NAME="item_%2Dlabel_%3D%3E_text"><STRONG>-label</STRONG> => <EM>text</EM></A></STRONG><BR> <DD> The text of the label to be placed with the Frame. <P></P> <DT><STRONG><A NAME="item_%2Dlabelside_%3D%3E_where"><STRONG>-labelside</STRONG> => <EM>where</EM></A></STRONG><BR> <DD> <EM>Where</EM> can be one of <STRONG>left</STRONG>, <STRONG>right</STRONG>, <STRONG>top</STRONG>, <STRONG>bottom</STRONG> or <STRONG>acrosstop</STRONG>. The first four work as might be expected and place the label to the left, right, above or below the frame respectively. The <STRONG>acrosstop</STRONG> creates a grooved frame around the central frame and puts the label near the northwest corner such that it appears to ``overwrite'' the groove. <P></P></DL> <P> <HR> <H1><A NAME="example">EXAMPLE</A></H1> <P>Run the following test program to see this in action:</P> <PRE> use strict; use Tk; require Tk::LabFrame; require Tk::LabEntry;</PRE> <PRE> my $test = 'Test this'; my $mw = Tk::MainWindow->new; my $f = $mw->LabFrame(-label => "This is a label", -labelside => "acrosstop"); $f->LabEntry(-label => "Testing", -textvariable => \$test)->pack; $f->pack; Tk::MainLoop;</PRE> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> <P>Perhaps <STRONG>LabFrame</STRONG> should be subsumed within the generic pTk labeled widget mechanism.</P> <P> <HR> <H1><A NAME="author">AUTHOR</A></H1> <P><STRONG>Rajappa Iyer</STRONG> <A HREF="mailto:rsi@earthling.net">rsi@earthling.net</A></P> <P>This code is derived from LabFrame.tcl and LabWidg.tcl in the Tix4.0 distribution by Ioi Lam. The code may be redistributed under the same terms as Perl.</P> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%> <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc"> <STRONG><P CLASS=block> Tk::LabFrame - labeled frame.</P></STRONG> </TD></TR> </TABLE> </BODY> </HTML>