71 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <HTML><HEAD><TITLE>Tk Built-In Commands - tk_dialog manual page</TITLE></HEAD><BODY>
 | |
| <DL>
 | |
| <DD><A HREF="dialog.htm#M2" NAME="L357">NAME</A>
 | |
| <DL><DD>tk_dialog - Create modal dialog and wait for response</DL>
 | |
| <DD><A HREF="dialog.htm#M3" NAME="L358">SYNOPSIS</A>
 | |
| <DL>
 | |
| <DD><B>tk_dialog </B><I>window title text bitmap default string string ...</I>
 | |
| </DL>
 | |
| <DD><A HREF="dialog.htm#M4" NAME="L359">DESCRIPTION</A>
 | |
| <DL>
 | |
| <DD><A HREF="dialog.htm#M5" NAME="L360"><I>window</I></A>
 | |
| <DD><A HREF="dialog.htm#M6" NAME="L361"><I>title</I></A>
 | |
| <DD><A HREF="dialog.htm#M7" NAME="L362"><I>text</I></A>
 | |
| <DD><A HREF="dialog.htm#M8" NAME="L363"><I>bitmap</I></A>
 | |
| <DD><A HREF="dialog.htm#M9" NAME="L364"><I>default</I></A>
 | |
| <DD><A HREF="dialog.htm#M10" NAME="L365"><I>string</I></A>
 | |
| </DL>
 | |
| <DD><A HREF="dialog.htm#M11" NAME="L366">KEYWORDS</A>
 | |
| </DL><HR>
 | |
| <H3><A NAME="M2">NAME</A></H3>
 | |
| tk_dialog - Create modal dialog and wait for response
 | |
| <H3><A NAME="M3">SYNOPSIS</A></H3>
 | |
| <B>tk_dialog </B><I>window title text bitmap default string string ...</I><BR>
 | |
| <H3><A NAME="M4">DESCRIPTION</A></H3>
 | |
| This procedure is part of the Tk script library.
 | |
| Its arguments describe a dialog box:
 | |
| <P>
 | |
| <DL>
 | |
| <P><DT><A NAME="M5"><I>window</I></A><DD>
 | |
| Name of top-level window to use for dialog.  Any existing window
 | |
| by this name is destroyed.
 | |
| <P><DT><A NAME="M6"><I>title</I></A><DD>
 | |
| Text to appear in the window manager's title bar for the dialog.
 | |
| <P><DT><A NAME="M7"><I>text</I></A><DD>
 | |
| Message to appear in the top portion of the dialog box.
 | |
| <P><DT><A NAME="M8"><I>bitmap</I></A><DD>
 | |
| If non-empty, specifies a bitmap to display in the top portion of
 | |
| the dialog, to the left of the text.
 | |
| If this is an empty string then no bitmap is displayed in the dialog.
 | |
| <P><DT><A NAME="M9"><I>default</I></A><DD>
 | |
| If this is an integer greater than or equal to zero, then it gives
 | |
| the index of the button that is to be the default button for the dialog
 | |
| (0 for the leftmost button, and so on).
 | |
| If less than zero or an empty string then there won't be any default
 | |
| button.
 | |
| <P><DT><A NAME="M10"><I>string</I></A><DD>
 | |
| There will be one button for each of these arguments.
 | |
| Each <I>string</I> specifies text to display in a button,
 | |
| in order from left to right.
 | |
| <P></DL>
 | |
| <P>
 | |
| After creating a dialog box, <B>tk_dialog</B> waits for the user to
 | |
| select one of the buttons either by clicking on the button with the
 | |
| mouse or by typing return to invoke the default button (if any).
 | |
| Then it returns the index of the selected button:  0 for the leftmost
 | |
| button, 1 for the button next to it, and so on.
 | |
| If the dialog's window is destroyed before the user selects one
 | |
| of the buttons, then -1 is returned.
 | |
| <P>
 | |
| While waiting for the user to respond, <B>tk_dialog</B> sets a local
 | |
| grab.  This prevents the user from interacting with the application
 | |
| in any way except to invoke the dialog box.
 | |
| 
 | |
| <H3><A NAME="M11">KEYWORDS</A></H3>
 | |
| <A href="../Keywords/B.htm#bitmap">bitmap</A>, <A href="../Keywords/D.htm#dialog">dialog</A>, <A href="../Keywords/M.htm#modal">modal</A>
 | |
| <HR><PRE>
 | |
| <A HREF="../copyright.htm">Copyright</A> © 1992 The Regents of the University of California.
 | |
| <A HREF="../copyright.htm">Copyright</A> © 1994-1996 Sun Microsystems, Inc.
 | |
| <A HREF="../copyright.htm">Copyright</A> © 1995-1997 Roger E. Critchlow Jr.</PRE>
 | |
| </BODY></HTML>
 | 
