home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / zkuste / Perl / ActivePerl-5.6.0.613.msi / 䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥 / _4fd868d7cb069fb1748d8e28e77a8164 < prev    next >
Encoding:
Text File  |  2000-03-23  |  4.5 KB  |  126 lines

  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Tk::DialogBox - create and manipulate a dialog screen.</TITLE>
  5. <LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
  6. <LINK REV="made" HREF="mailto:">
  7. </HEAD>
  8.  
  9. <BODY>
  10. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  11. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  12. <STRONG><P CLASS=block> Tk::DialogBox - create and manipulate a dialog screen.</P></STRONG>
  13. </TD></TR>
  14. </TABLE>
  15.  
  16. <A NAME="__index__"></A>
  17. <!-- INDEX BEGIN -->
  18.  
  19. <UL>
  20.  
  21.     <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
  22.  
  23.     <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
  24.     <LI><A HREF="#description">DESCRIPTION</A></LI>
  25.     <LI><A HREF="#methods">METHODS</A></LI>
  26.     <LI><A HREF="#bugs">BUGS</A></LI>
  27.     <LI><A HREF="#author">AUTHOR</A></LI>
  28. </UL>
  29. <!-- INDEX END -->
  30.  
  31. <HR>
  32. <P>
  33. <H1><A NAME="name">NAME</A></H1>
  34. <P>Tk::DialogBox - create and manipulate a dialog screen.</P>
  35. <P>
  36. <HR>
  37. <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
  38. <UL>
  39. <LI>Linux</LI>
  40. <LI>Solaris</LI>
  41. <LI>Windows</LI>
  42. </UL>
  43. <HR>
  44. <H1><A NAME="synopsis">SYNOPSIS</A></H1>
  45. <PRE>
  46.     use Tk::DialogBox
  47.     ...
  48.     $d = $top->DialogBox(-title => "Title", -buttons => ["OK", "Cancel"]);
  49.     $w = $d->add(Widget, args);
  50.     ...
  51.     $button = $d->Show;</PRE>
  52. <P>
  53. <HR>
  54. <H1><A NAME="description">DESCRIPTION</A></H1>
  55. <P><STRONG>DialogBox</STRONG> is very similar to <STRONG>Dialog</STRONG> except that it allows
  56. any widget in the top frame. <STRONG>DialogBox</STRONG> creates two
  57. frames---``top'' and ``bottom''. The bottom frame shows all the
  58. specified buttons, lined up from left to right. The top frame acts
  59. as a container for all other widgets that can be added with the
  60. <STRONG>add()</STRONG> method. The non-standard options recognized by
  61. <STRONG>DialogBox</STRONG> are as follows:</P>
  62. <DL>
  63. <DT><STRONG><A NAME="item_%2Dtitle"><STRONG>-title</STRONG></A></STRONG><BR>
  64. <DD>
  65. Specify the title of the dialog box. If this is not set, then the
  66. name of the program is used.
  67. <P></P>
  68. <DT><STRONG><A NAME="item_%2Dbuttons"><STRONG>-buttons</STRONG></A></STRONG><BR>
  69. <DD>
  70. The buttons to display in the bottom frame. This is a reference to
  71. an array of strings containing the text to put on each
  72. button. There is no default value for this. If you do not specify
  73. any buttons, no buttons will be displayed.
  74. <P></P>
  75. <DT><STRONG><A NAME="item_%2Ddefault_button"><STRONG>-default_button</STRONG></A></STRONG><BR>
  76. <DD>
  77. Specifies the default button that is considered invoked when user
  78. presses <Return> on the dialog box. This button is highlighted. If
  79. no default button is specified, then the first element of the
  80. array whose reference is passed to the <STRONG>-buttons</STRONG> option is used
  81. as the default.
  82. <P></P></DL>
  83. <P>
  84. <HR>
  85. <H1><A NAME="methods">METHODS</A></H1>
  86. <P><STRONG>DialogBox</STRONG> supports only two methods as of now:</P>
  87. <DL>
  88. <DT><STRONG><A NAME="item_add"><STRONG>add(</STRONG><EM>widget</EM>, <EM>options</EM><STRONG>)</STRONG></A></STRONG><BR>
  89. <DD>
  90. Add the widget indicated by <EM>widget</EM>. <EM>Widget</EM> can be the name
  91. of any Tk widget (standard or contributed). <EM>Options</EM> are the
  92. options that the widget accepts. The widget is advertized as a
  93. subwidget of <STRONG>DialogBox</STRONG>.
  94. <P></P>
  95. <DT><STRONG><A NAME="item_Show"><STRONG>Show(</STRONG><EM>grab</EM><STRONG>)</STRONG></A></STRONG><BR>
  96. <DD>
  97. Display the dialog box, until user invokes one of the buttons in
  98. the bottom frame. If the grab type is specified in <EM>grab</EM>, then
  99. <STRONG>Show</STRONG> uses that grab; otherwise it uses a local grab. Returns
  100. the name of the button invoked.
  101. <P></P></DL>
  102. <P>
  103. <HR>
  104. <H1><A NAME="bugs">BUGS</A></H1>
  105. <P>There is no way of removing a widget once it has been added to the
  106. top frame.</P>
  107. <P>There is no control over the appearance of the buttons in the
  108. bottom frame nor is there any way to control the placement of the
  109. two frames with respect to each other e.g. widgets to the left,
  110. buttons to the right instead of widgets on the top and buttons on
  111. the bottom always.</P>
  112. <P>
  113. <HR>
  114. <H1><A NAME="author">AUTHOR</A></H1>
  115. <P><STRONG>Rajappa Iyer</STRONG> <A HREF="mailto:rsi@earthling.net">rsi@earthling.net</A></P>
  116. <P>This code is distributed under the same terms as Perl.</P>
  117. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  118. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  119. <STRONG><P CLASS=block> Tk::DialogBox - create and manipulate a dialog screen.</P></STRONG>
  120. </TD></TR>
  121. </TABLE>
  122.  
  123. </BODY>
  124.  
  125. </HTML>
  126.