;ò
:òcBc @ sÄ d k Z e i ƒ Z e i e ƒ d e i f d „ ƒ YZ d e i f d „ ƒ YZ d „ Z d Z e
d j oP d k Z d k Z d k
Z
e
i d e i i e i d ƒ g e i d
ƒ n d S( Ns
TestDialogc B s# t Z e i e i e i d „ Z RS( Nc C sl t i ƒ } | i t i ƒ | i | | | | | | ƒ | i
| ƒ t i t i ƒ }
t i | d d ƒ } | i d ƒ |
i | d t i t i Bd ƒ t i t i ƒ } t i | d d ƒ } | i d ƒ | i | d t i t i Bd ƒ t i | d d d d d f ƒ} | i d
ƒ | i | d t i t i Bd ƒ |
i | d t i t i Bt i Bd ƒ t i t i ƒ } t i | d d ƒ } | i d ƒ | i | d t i t i Bd ƒ t i | d d d d d f ƒ} | i d
ƒ | i | d t i t i Bd ƒ |
i | d t i t i Bt i Bd ƒ t i | d d d d f d t i ƒ} |
i | d t i t i Bt i Bt i! Bd ƒ t i" ƒ } t i$ d j o t i% | ƒ }
| i' |
ƒ n t i( | t i) ƒ }
|
i d ƒ |
i* ƒ | i' |
ƒ t i( | t i+ ƒ }
|
i d ƒ | i' |
ƒ | i, ƒ |
i | d t i t i Bd ƒ | i- |
ƒ |
i. | ƒ d S( Niÿÿÿÿs This is a wx.Dialogs# This is the help text for the labeli i s Field #1:s s sizeiP s" Here's some help text for field #1i s Field #2:s" Here's some help text for field #2i s styles __WXMSW__s" The OK button completes the dialogs2 The Cancel button cnacels the dialog. (Cool, huh?)(/ s wxs PreDialogs pres
SetExtraStyles DIALOG_EX_CONTEXTHELPs Creates parents IDs titles poss sizes styles selfs
PostCreates BoxSizers VERTICALs sizers
StaticTexts labels SetHelpTexts Adds ALIGN_CENTREs ALLs
HORIZONTALs boxs TextCtrls texts GROWs ALIGN_CENTER_VERTICALs
StaticLines
LI_HORIZONTALs lines RIGHTs TOPs StdDialogButtonSizers btnsizers Platforms ContextHelpButtons btns AddButtons Buttons ID_OKs
SetDefaults ID_CANCELs Realizes SetSizers Fit( s selfs parents IDs titles sizes poss styles pres boxs btnsizers sizers texts labels btns line( ( sf /mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Dialog.pys __init__
sR
!
'
!
''.
( s __name__s
__module__s wxs DefaultSizes DefaultPositions DEFAULT_DIALOG_STYLEs __init__( ( ( sf /mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Dialog.pys
TestDialog s s TestPanelc B s t Z d „ Z d „ Z RS( Nc C sZ | | _ t i i | | d ƒ t i | d d d d f ƒ } | i t i | i
| ƒ d S( Niÿÿÿÿs Create and Show a custom Dialogi2 ( s logs selfs wxs Panels __init__s parents Buttons bs Binds
EVT_BUTTONs OnButton( s selfs parents logs b( ( sf /mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Dialog.pys __init__Z s c C s t | d d d d d f d t i ƒ} | i ƒ | i ƒ } | t i j o | i i
d ƒ n | i i
d ƒ | i ƒ d S( Niÿÿÿÿs This is a Dialogs sizei^ iÈ s styles You pressed OK
s You pressed Cancel
( s
TestDialogs selfs wxs DEFAULT_DIALOG_STYLEs dlgs CenterOnScreens ShowModals vals ID_OKs logs WriteTexts Destroy( s selfs evts dlgs val( ( sf /mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Dialog.pys OnButtonb s
( s __name__s
__module__s __init__s OnButton( ( ( sf /mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Dialog.pys TestPanelY s c C s t | | ƒ } | Sd S( N( s TestPanels nbs logs win( s frames nbs logs win( ( sf /mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Dialog.pys runTestw s sÔ wxPython offers quite a few general purpose dialogs for useful data input from
the user; they are all based on the wx.Dialog class, which you can also subclass
to create custom dialogs to suit your needs.
The Dialog class, in addition to dialog-like behaviors, also supports the full
wxWindows layout featureset, which means that you can incorporate sizers or
layout constraints as needed to achieve the look and feel desired. It even supports
context-sensitive help, which is illustrated in this example.
The example is very simple; in real world situations, a dialog that had input
fields such as this would no doubt be required to deliver those values back to
the calling function. The Dialog class supports data retrieval in this manner.
However, the data must be retrieved prior to the dialog being destroyed.
The example shown here is modal; non-modal dialogs are possible as well.
See the documentation for the Dialog class for more details.
s __main__s i i ( s wxs SimpleHelpProviders providers HelpProvider_Sets Dialogs
TestDialogs Panels TestPanels runTests overviews __name__s syss oss runs mains paths basenames argv( s syss runs
TestDialogs overviews runTests providers wxs oss TestPanel( ( sf /mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/Dialog.pys ? s
M