dabo Commit
Revision 6479
Date: 2011-02-27 07:04:01 -0800 (Sun, 27 Feb 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6479

Changed:
U   trunk/dabo/ui/uiwx/dMessageBox.py

Log:
Modified the test code to allow an easy way to exit the test app.

Diff:
Modified: trunk/dabo/ui/uiwx/dMessageBox.py
===================================================================
--- trunk/dabo/ui/uiwx/dMessageBox.py   2011-02-27 15:03:16 UTC (rev 6478)
+++ trunk/dabo/ui/uiwx/dMessageBox.py   2011-02-27 15:04:01 UTC (rev 6479)
@@ -8,6 +8,7 @@
 """
 import wx
 import dabo
+from dabo.dLocalize import _
 
 
 def getForm():
@@ -182,7 +183,18 @@
 
        # Test requesting user attention:
        frm = dabo.ui.dForm()
-       print info("After you click okay, switch to another running application 
within 5 seconds, to test the requestUserAttention setting.", parent=frm)
+       def onExit(evt):
+               app.onFileExit(evt)
+       cap = _("After you click okay, switch to another running 
application\nwithin 5 seconds, to test"
+                       " the requestUserAttention setting.\n\n\nAfterwards, 
click the button below to exit.")
+       lbl = dabo.ui.dLabel(frm, Caption=cap)
+       ln = dabo.ui.dLine(frm, Orientation="H", Height=3)
+       btn = dabo.ui.dButton(frm, Caption=_("Exit"), OnHit=onExit)
+       frm.Sizer.append(lbl, halign="center", border=20)
+       frm.Sizer.append(ln, "x", halign="center", border=120, 
borderSides=["left", "right"])
+       frm.Sizer.appendSpacer(80)
+       frm.Sizer.append(btn, halign="center")
+       frm.layout()
        dabo.ui.callAfterInterval(5000, exclaim, "Abort! Abort!", parent=frm)
        frm.show()
        app.start()



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to