dabo Commit
Revision 5193
Date: 2009-04-29 09:42:26 -0700 (Wed, 29 Apr 2009)
Author: Johnf
Trac: http://trac.dabodev.com/changeset/5193
Changed:
U trunk/dabo/ui/uiwx/dDateTextBox.py
Log:
Added method flushValue() to fix the return value not setting
bizobj.isChanged() correctly.
Added method __onBtnClick() to allow a button to activate the calendar.
However, the button is not currently available. Hope to look at this at a
later date.
Diff:
Modified: trunk/dabo/ui/uiwx/dDateTextBox.py
===================================================================
--- trunk/dabo/ui/uiwx/dDateTextBox.py 2009-04-28 20:31:20 UTC (rev 5192)
+++ trunk/dabo/ui/uiwx/dDateTextBox.py 2009-04-29 16:42:26 UTC (rev 5193)
@@ -91,7 +91,7 @@
self.calButton = dButton(self.Parent,
Size=(self.Height, self.Height),
Right=self.Right, Caption="V")
self.calButton.Visible = True
- self.calButton.bindEvent(dEvents.Hit, self.onDblClick)
+ self.calButton.bindEvent(dEvents.Hit, __onBtnClick)
# Tooltip help
self._defaultToolTipText = _("""Available Keys:
@@ -122,7 +122,13 @@
""" Display a calendar to allow users to select dates."""
self.showCalendar()
+ def __onBtnClick(self,evt):
+ """ Display a calendar to allow users to select dates."""
+ self.showCalendar()
+
+
+
def showCalendar(self):
if self.ReadOnly:
# ignore
@@ -133,6 +139,9 @@
fp.Owner = self
fp.show()
+
+
+
def __onChar(self, evt):
""" If a shortcut key was pressed, process that. Otherwise, eat
@@ -403,6 +412,7 @@
self.Value = val.replace(year=dt.year, month=dt.month,
day=dt.day)
else:
self.Value = dt
+ self.flushValue()
def _getCalendarPanel(self):
fp = self.Form.FloatingPanel
@@ -423,6 +433,10 @@
self._extendedCalendar = val
else:
self._properties["ExtendedCalendar"] = val
+
+ def flushValue(self,*args, **kwargs):
+ self.super(*args,**kwargs)
+
_CalendarPanel = property(_getCalendarPanel, None, None,
_______________________________________________
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]