/Doc/Dialog.html

https://bitbucket.org/alsh/pygui-mirror · HTML · 44 lines · 43 code · 1 blank · 0 comment · 0 complexity · bcb1b1f73cd8cad1e6a95de344663cfe MD5 · raw file

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html><head>
  3. <title>Dialog</title><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></head>
  4. <body>
  5. <h1>class <tt>Dialog(<a href="Window.html">Window</a>)</tt></h1>
  6. <br>
  7. The Dialog class is a subclass of <a href="Window.html">Window</a> designed
  8. for use as a dialog box. It provides facilities for defining default and
  9. cancel buttons that are activated by keyboard equivalents.<br>
  10. <br>
  11. A Dialog differs from a Window in having a default style of <tt>'nonmodal_dialog'</tt>,
  12. and by default (if possible on the platform) not being closable, zoomable
  13. or resizable. These options can be overridden in the constructor call. <br>
  14. <br>
  15. On platforms which display a menu bar at the top of each window, a Dialog
  16. does not normally have a menu bar. Enabled menu items are still available by their
  17. keyboard equivalents while the Dialog is active, however.<br>
  18. <h2>Constructor</h2>
  19. <blockquote>
  20. <dl>
  21. <dt><tt>Dialog(style</tt> <tt>=</tt> <tt>'nonmodal_dialog',</tt></dt>
  22. <dt><tt>&nbsp; &nbsp; &nbsp; &nbsp;</tt><tt>closable</tt> <tt>=</tt> <tt>False,</tt>
  23. <tt>resizable</tt> <tt>=</tt> <tt>False,</tt> <tt>zoomable</tt> = <tt>False</tt><tt>,</tt></dt>
  24. <dt><tt>&nbsp; &nbsp; &nbsp; &nbsp;movable</tt> <tt>=</tt> <i>platform_default</i><tt>,</tt> <tt>hidable</tt>
  25. = <i>platform_default</i><tt>)<br></tt></dt>
  26. <dd>Constructs a Dialog with the specified options. The default values
  27. for the movable and hidable options are platform-dependent.</dd>
  28. </dl>
  29. </blockquote>
  30. <h2>Action Properties</h2>
  31. <blockquote>
  32. <dl>
  33. <dt><tt>default_action</tt></dt>
  34. <dd><span style="font-family: monospace;"></span>Action
  35. to perform in response to a Return or Enter key event. This action is
  36. also typically invoked by activating a default button or pressing
  37. Return or Enter in a text field. The default is <span style="font-family: monospace;">'ok'</span>, which is implemented by <a href="ModalDialog.html">ModalDialog</a> to dismiss the dialog with the value <span style="font-family: monospace;">True</span>. You can create a button which invokes this action using <a href="Button.html#DefaultButton">DefaultButton</a>.</dd></dl><dl><dt><tt>cancel_action</tt></dt>
  38. <dd>Action to perform in response to an Escape key event.&nbsp;This action is also typically invoked by activating a cancel button or pressing Escape in a text field. The default is <span style="font-family: monospace;">'cancel'</span>, which is implemented by <a href="ModalDialog.html">ModalDialog</a> to dismiss the dialog with the value <span style="font-family: monospace;">False</span>. You can create a button which invokes this action using <a href="Button.html#CancelButton">CancelButton</a>.</dd>
  39. </dl>
  40. </blockquote>
  41. <br>
  42. <br>
  43. </body></html>