PageRenderTime 26ms CodeModel.GetById 17ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

HTML | 40 lines | 39 code | 1 blank | 0 comment | 0 complexity | 7d8335f49d314c794644d5694ff8e64d MD5 | raw file
 1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 2<html><head><title>PyGUI - ModalDialog class</title>
 4        <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></head>
 6 <h1>class <tt>ModalDialog(Dialog)</tt></h1>
 7 The ModalDialog class is a subclass of <a href="Dialog.html">Dialog</a>
 8designed for modal dialogs. It has a default style of <tt>'modal_dialog'</tt>
 9and provides facilities for presenting the dialog modally.<br>
10 <br>
11 While a ModalDialog is active, interaction with other parts of the application 
12is prevented. Other windows cannot be activated, application-wide menu commands 
13other than those used by the dialog itself are not enabled, and unhandled 
14events and messages are not forwarded to the application.<br>
15 <h2>Constructor</h2>
16 <blockquote>        <dl>
17    <dt><tt>ModalDialog(style</tt> <tt>=</tt> <tt>'modal_dialog',</tt></dt>
18    <dt><tt>&nbsp; &nbsp; </tt><tt>closable</tt>       <tt>=</tt> <tt>False,</tt>       <tt>resizable</tt> <tt>=</tt> <tt>False,</tt> <tt>zoomable</tt> = <tt>False</tt><tt>,</tt></dt>
19    <dt><tt>&nbsp; &nbsp; movable</tt> <tt>=</tt> <i>default</i><tt>,</tt> <tt>hidable</tt> =&nbsp;<i>default</i><tt>)</tt></dt>
20    <dd><br>Constructs a ModalDialog with the specified options. The default values
21for the <tt>movable</tt> and <tt>hidable</tt> options are platform-dependent.</dd>
22  </dl>
23  </blockquote>
24 <h2>Methods</h2>
25 <blockquote>     <dl>
26    <dt><tt>present()</tt></dt>
27    <dd>Present the dialog modally. The dialog is shown and a nested event 
28loop is entered which prevents interaction with any other part of the application. 
29This method retains control until the dialog's <tt>dismiss()</tt> method is
30called. The dialog is then hidden and the <span style="font-family: monospace;">present()</span> method returns with the value passed to <tt>dismiss()</tt>.<br>
31 </dd>
32  </dl>
34 <blockquote>     <dl>
35    <dt><tt>dismiss(result</tt> <tt>=</tt> <tt>0)</tt></dt>
36    <dd>Hides the dialog and, if the dialog is being presented modally, causes the <tt>present()</tt> method to return with the given result as its return value.<br><br></dd><dt style="font-family: monospace;">ok()</dt><dd>Dismisses the dialog with the value <span style="font-family: monospace;">True</span>. By default, this method is called in response to pressing a <a href="Button.html#DefaultButton">DefaultButton</a> or&nbsp;a Return/Enter key event.<br><br></dd><dt style="font-family: monospace;">cancel()</dt><dd>Dismisses the dialog with the value <span style="font-family: monospace;">False</span>. By default, this method is called in response to pressing a&nbsp;<a href="Button.html#CancelButton">CancelButton</a> or&nbsp;an Escape key event.</dd>
37  </dl>
38 </blockquote>
39 ---