home *** CD-ROM | disk | FTP | other *** search
Wrap
<HTML> <HEAD> <TITLE>Tk::NoteBook - display several windows in limited space with notebook metaphor.</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::NoteBook - display several windows in limited space with notebook metaphor.</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="#methods">METHODS</A></LI> <LI><A HREF="#authors">AUTHORS</A></LI> </UL> <!-- INDEX END --> <HR> <P> <H1><A NAME="name">NAME</A></H1> <P>Tk::NoteBook - display several windows in limited space with notebook metaphor.</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> <PRE> use Tk::NoteBook; ... $w = $frame->NoteBook(); $page1 = $w->add("page1", options); $page2 = $w->add("page2", options); ... $page2 = $w->add("page2", options);</PRE> <P> <HR> <H1><A NAME="description">DESCRIPTION</A></H1> <P>The NoteBook widget provides a notebook metaphor to display several windows in limited space. The notebook is divided into a stack of pages of which only one is displayed at any time. The other pages can be selected by means of choosing the visual ``tabs'' at the top of the widget. Additionally, the <Tab> key may be used to traverse the pages. If <STRONG>-underline</STRONG> is used, Alt- bindings will also work.</P> <P>The widget takes all the options that a Frame does. In addition, it supports the following options:</P> <DL> <DT><STRONG><A NAME="item_%2Ddynamicgeometry"><STRONG>-dynamicgeometry</STRONG></A></STRONG><BR> <DD> If set to false (default and recommended), the size of the NoteBook will match the size of the largest page. Otherwise the size will match the size of the current page causing the NoteBook to change size when different pages of different sizes are selected. <P></P> <DT><STRONG><A NAME="item_%2Dipadx"><STRONG>-ipadx</STRONG></A></STRONG><BR> <DD> The amount of internal horizontal padding around the pages. <P></P> <DT><STRONG><A NAME="item_%2Dipady"><STRONG>-ipady</STRONG></A></STRONG><BR> <DD> The amount of internal vertical padding around the pages. <P></P></DL> <P> <HR> <H1><A NAME="methods">METHODS</A></H1> <P>The following methods may be used with a NoteBook object in addition to standard methods.</P> <DL> <DT><STRONG><A NAME="item_add"><STRONG>add(</STRONG><EM>pageName</EM>, <EM>options</EM><STRONG>)</STRONG></A></STRONG><BR> <DD> Adds a page with name <EM>pageName</EM> to the notebook. Returns an object of type <STRONG>Frame</STRONG>. The recognized <EM>options</EM> are: <DL> <DT><STRONG><A NAME="item_%2Danchor"><STRONG>-anchor</STRONG></A></STRONG><BR> <DD> Specifies how the information in a tab is to be displayed. Must be one of <STRONG>n</STRONG>, <STRONG>ne</STRONG>, <STRONG>e</STRONG>, <STRONG>se</STRONG>, <STRONG>s</STRONG>, <STRONG>sw</STRONG>, <STRONG>w</STRONG>, <STRONG>nw</STRONG> or <STRONG>center</STRONG>. <P></P> <DT><STRONG><A NAME="item_%2Dbitmap"><STRONG>-bitmap</STRONG></A></STRONG><BR> <DD> Specifies a bitmap to display on the tab of this page. The bitmap is displayed only if none of the <STRONG>-label</STRONG> or <STRONG>-image</STRONG> options are specified. <P></P> <DT><STRONG><A NAME="item_%2Dimage"><STRONG>-image</STRONG></A></STRONG><BR> <DD> Specifies an image to display on the tab of this page. The image is displayed only if the <STRONG>-label</STRONG> option is not specified. <P></P> <DT><STRONG><A NAME="item_%2Dlabel"><STRONG>-label</STRONG></A></STRONG><BR> <DD> Specifies the text string to display on the tab of this page. <P></P> <DT><STRONG><A NAME="item_%2Djustify"><STRONG>-justify</STRONG></A></STRONG><BR> <DD> When there are multiple lines of text displayed in a tab, this option determines the justification of the lines. <P></P> <DT><STRONG><A NAME="item_%2Dcreatecmd"><STRONG>-createcmd</STRONG></A></STRONG><BR> <DD> Specifies a <A HREF="../../../site/lib/Tk/callbacks.html">callback</A> to be called the first time the page is shown on the screen. This option can be used to delay the creation of the contents of a page until necessary. It can be useful in situations where there are a large number of pages in a NoteBook widget; with <STRONG>-createcmd</STRONG> you do not have to make the user wait until all pages are constructed before displaying the first page. <P></P> <DT><STRONG><A NAME="item_%2Draisecmd"><STRONG>-raisecmd</STRONG></A></STRONG><BR> <DD> Specifies a <A HREF="../../../site/lib/Tk/callbacks.html">callback</A> to be called whenever this page is raised by the user. <P></P> <DT><STRONG><A NAME="item_%2Dstate"><STRONG>-state</STRONG></A></STRONG><BR> <DD> Specifies whether this page can be raised by the user. Must be either <STRONG>normal</STRONG> or <STRONG>disabled</STRONG>. <P></P> <DT><STRONG><A NAME="item_%2Dunderline"><STRONG>-underline</STRONG></A></STRONG><BR> <DD> Specifies the integer index of a character to underline in the tab. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of text displayed on the widget, 1 to the next character and so on. <P></P> <DT><STRONG><A NAME="item_%2Dwraplength"><STRONG>-wraplength</STRONG></A></STRONG><BR> <DD> This option specifies the maximum line length of the label string on this tab. If the line length of the label string exceeds this length, then it is wrapped onto the next line so that no line is longer than the specified length. The value may be specified in any standard forms for screen distances. If this value is less than or equal to 0, then no wrapping is done: lines will break only at newline characters in the text. <P></P></DL> <DT><STRONG><A NAME="item_delete"><STRONG>delete(</STRONG><EM>pageName</EM><STRONG>)</STRONG></A></STRONG><BR> <DD> Deletes the page identified by <EM>pageName</EM>. <P></P> <DT><STRONG><A NAME="item_pagecget"><STRONG>pagecget(</STRONG><EM>pageName</EM>, <EM>-option</EM><STRONG>)</STRONG></A></STRONG><BR> <DD> Returns the current value of the configuration option given by <EM>-option</EM> in the page given by <EM>pageName</EM>. <EM>Option</EM> may have any of the values accepted in the <STRONG>add</STRONG> method. <P></P> <DT><STRONG><A NAME="item_pageconfigure"><STRONG>pageconfigure(</STRONG><EM>pageName</EM>, <EM>options</EM><STRONG>)</STRONG></A></STRONG><BR> <DD> Like configure for the page indicated by <EM>pageName</EM>. <EM>Options</EM> may be any of the options accepted by the <STRONG>add</STRONG> method. <P></P> <DT><STRONG><A NAME="item_raise"><STRONG>raise(</STRONG><EM>pageName</EM><STRONG>)</STRONG></A></STRONG><BR> <DD> Raise the page identified by <EM>pageName</EM>. <P></P> <DT><STRONG><A NAME="item_raised"><STRONG>raised()</STRONG></A></STRONG><BR> <DD> Returns the name of the currently raised page. <P></P></DL> <P> <HR> <H1><A NAME="authors">AUTHORS</A></H1> <P><STRONG>Rajappa Iyer</STRONG> <<A HREF="mailto:rsi@earthling.net">rsi@earthling.net</A>> Nick Ing-Simmons <<A HREF="mailto:nick@ni-s.u-net.com">nick@ni-s.u-net.com</A>></P> <P>This code and documentation was derived from NoteBook.tcl in Tix4.0 written by Ioi Lam. It may be distributed under the same conditions as Perl itself.</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::NoteBook - display several windows in limited space with notebook metaphor.</P></STRONG> </TD></TR> </TABLE> </BODY> </HTML>