home *** CD-ROM | disk | FTP | other *** search
-
- <HTML>
- <HEAD>
- <TITLE>Tk::DialogBox - create and manipulate a dialog screen.</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::DialogBox - create and manipulate a dialog screen.</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="#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::DialogBox - create and manipulate a dialog screen.</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::DialogBox
- ...
- $d = $top->DialogBox(-title => "Title", -buttons => ["OK", "Cancel"]);
- $w = $d->add(Widget, args);
- ...
- $button = $d->Show;</PRE>
- <P>
- <HR>
- <H1><A NAME="description">DESCRIPTION</A></H1>
- <P><STRONG>DialogBox</STRONG> is very similar to <STRONG>Dialog</STRONG> except that it allows
- any widget in the top frame. <STRONG>DialogBox</STRONG> creates two
- frames---``top'' and ``bottom''. The bottom frame shows all the
- specified buttons, lined up from left to right. The top frame acts
- as a container for all other widgets that can be added with the
- <STRONG>add()</STRONG> method. The non-standard options recognized by
- <STRONG>DialogBox</STRONG> are as follows:</P>
- <DL>
- <DT><STRONG><A NAME="item_%2Dtitle"><STRONG>-title</STRONG></A></STRONG><BR>
- <DD>
- Specify the title of the dialog box. If this is not set, then the
- name of the program is used.
- <P></P>
- <DT><STRONG><A NAME="item_%2Dbuttons"><STRONG>-buttons</STRONG></A></STRONG><BR>
- <DD>
- The buttons to display in the bottom frame. This is a reference to
- an array of strings containing the text to put on each
- button. There is no default value for this. If you do not specify
- any buttons, no buttons will be displayed.
- <P></P>
- <DT><STRONG><A NAME="item_%2Ddefault_button"><STRONG>-default_button</STRONG></A></STRONG><BR>
- <DD>
- Specifies the default button that is considered invoked when user
- presses <Return> on the dialog box. This button is highlighted. If
- no default button is specified, then the first element of the
- array whose reference is passed to the <STRONG>-buttons</STRONG> option is used
- as the default.
- <P></P></DL>
- <P>
- <HR>
- <H1><A NAME="methods">METHODS</A></H1>
- <P><STRONG>DialogBox</STRONG> supports only two methods as of now:</P>
- <DL>
- <DT><STRONG><A NAME="item_add"><STRONG>add(</STRONG><EM>widget</EM>, <EM>options</EM><STRONG>)</STRONG></A></STRONG><BR>
- <DD>
- Add the widget indicated by <EM>widget</EM>. <EM>Widget</EM> can be the name
- of any Tk widget (standard or contributed). <EM>Options</EM> are the
- options that the widget accepts. The widget is advertized as a
- subwidget of <STRONG>DialogBox</STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Show"><STRONG>Show(</STRONG><EM>grab</EM><STRONG>)</STRONG></A></STRONG><BR>
- <DD>
- Display the dialog box, until user invokes one of the buttons in
- the bottom frame. If the grab type is specified in <EM>grab</EM>, then
- <STRONG>Show</STRONG> uses that grab; otherwise it uses a local grab. Returns
- the name of the button invoked.
- <P></P></DL>
- <P>
- <HR>
- <H1><A NAME="bugs">BUGS</A></H1>
- <P>There is no way of removing a widget once it has been added to the
- top frame.</P>
- <P>There is no control over the appearance of the buttons in the
- bottom frame nor is there any way to control the placement of the
- two frames with respect to each other e.g. widgets to the left,
- buttons to the right instead of widgets on the top and buttons on
- the bottom always.</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 distributed 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::DialogBox - create and manipulate a dialog screen.</P></STRONG>
- </TD></TR>
- </TABLE>
-
- </BODY>
-
- </HTML>
-