dabo Commit
Revision 1535
Date: 2005-11-10 10:08:11 -0800 (Thu, 10 Nov 2005)
Author: ed
Changed:
U trunk/dabo/ui/uiwx/dSpinner.py
Log:
Added a call to flushValue() when the spinner's value changes.
Diff:
Modified: trunk/dabo/ui/uiwx/dSpinner.py
===================================================================
--- trunk/dabo/ui/uiwx/dSpinner.py 2005-11-10 17:37:34 UTC (rev 1534)
+++ trunk/dabo/ui/uiwx/dSpinner.py 2005-11-10 18:08:11 UTC (rev 1535)
@@ -20,6 +20,7 @@
super(dSpinner, self)._initEvents()
self.Bind(wx.EVT_SPINCTRL, self._onWxHit)
self.Bind(wx.EVT_TEXT, self._onWxText)
+ self.bindEvent(dEvents.Hit, self._onSpinnerHit)
def _preInitUI(self, kwargs):
@@ -40,7 +41,12 @@
# will return False, so we know to ignore the input.
self.raiseEvent(dabo.dEvents.Hit, evt)
+
+ def _onSpinnerHit(self, evt):
+ # Flush the data on each hit, not just when focus is lost.
+ self.flushValue()
+
# Property get/set/del methods follow. Scroll to bottom to see the
property
# definitions themselves.
def _getMax(self):
@@ -91,6 +97,8 @@
self.Max = 12
self.Min = 5
self.SpinnerWrap = True
+ self.DataSource="form"
+ self.DataField="Caption"
def onHit(self, evt):
print "HIT!", self.Value
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev