Changeset 3246
- Timestamp:
- 07/12/07 17:32:49 (1 year ago)
- Files:
-
- branches/stable/dabo/ui/uiwx/dMessageBox.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/stable/dabo/ui/uiwx/dMessageBox.py
r3054 r3246 30 30 def areYouSure(message="Are you sure?", title=None, defaultNo=False, 31 31 cancelButton=True, parent=None): 32 """Display a message dialog asking the user to answer Yes, No to a question.""" 32 """Display a dMessageBox asking the user to answer yes or no to a question. 33 34 Returns True, False, or None, for choices "Yes", "No", or "Cancel". 35 36 The default title comes from app.getAppInfo("appName"), or if the 37 application object isn't available it will be "Dabo Application". 38 39 If defaultNo is True, the 'No' button will be the default button. 40 41 If cancelButton is True (default), a third 'Cancel' button will appear. 42 43 If parent isn't passed, it will automatically resolve to the current 44 active form. 45 """ 33 46 if title is None: 34 47 title = getDefaultTitle() … … 52 65 53 66 def stop(message="Stop", title=None, parent=None): 67 """Display a dMessageBox informing the user that the operation cannot proceed. 68 69 Returns None. 70 71 The default title comes from app.getAppInfo("appName"), or if the 72 application object isn't available it will be "Dabo Application". 73 74 If parent isn't passed, it will automatically resolve to the current 75 active form. 76 """ 54 77 if title is None: 55 78 title = getDefaultTitle() … … 58 81 59 82 def info(message="Information", title=None, parent=None): 83 """Display a dMessageBox offering the user some useful information. 84 85 Returns None. 86 87 The default title comes from app.getAppInfo("appName"), or if the 88 application object isn't available it will be "Dabo Application". 89 90 If parent isn't passed, it will automatically resolve to the current 91 active form. 92 """ 60 93 if title is None: 61 94 title = getDefaultTitle() … … 64 97 65 98 def exclaim(message="Important!", title=None, parent=None): 99 """Display a dMessageBox urgently informing the user that we cannot proceed. 100 101 Returns None. 102 103 The default title comes from app.getAppInfo("appName"), or if the 104 application object isn't available it will be "Dabo Application". 105 106 If parent isn't passed, it will automatically resolve to the current 107 active form. 108 """ 66 109 if title is None: 67 110 title = getDefaultTitle() … … 73 116 dlg = dMessageBox(message, title, style, parent=parent) 74 117 dlg.CenterOnParent() 75 retval = dlg.ShowModal()76 dlg.Destroy()77 return None78 79 80 def info(message="Information", title=None, parent=None):81 if title is None:82 title = getDefaultTitle()83 style = wx.OK|wx.ICON_INFORMATION84 dlg = dMessageBox(message, title, style, parent=parent)85 118 retval = dlg.ShowModal() 86 119 dlg.Destroy()
