dabo Commit
Revision 4910
Date: 2009-01-06 15:06:43 -0800 (Tue, 06 Jan 2009)
Author: Ed
Trac: http://trac.dabodev.com/changeset/4910

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

Log:
This should fix some of the problems noticed by Ricardo Ar?\195?\161oz 
concerning the placement of the calendar when editing the dDateTextBox control.


Diff:
Modified: trunk/dabo/ui/uiwx/dPemMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPemMixin.py     2009-01-06 16:43:42 UTC (rev 4909)
+++ trunk/dabo/ui/uiwx/dPemMixin.py     2009-01-06 23:06:43 UTC (rev 4910)
@@ -953,7 +953,13 @@
                to the containing form. If no position is passed, returns the 
position
                of this control relative to the form.
                """
-               return self.containerCoordinates(self.Form, pos)
+               if isinstance(self, dabo.ui.dFormMixin):
+                       frm = self.Parent
+               else:
+                       frm = self.Form
+               if frm is None:
+                       return None
+               return self.containerCoordinates(frm, pos)
 
 
        def containerCoordinates(self, cnt, pos=None):
@@ -1014,7 +1020,11 @@
                """Translates a position value for a control to absolute screen 
position."""
                if pos is None:
                        pos = self.Position
-               return self.ClientToScreen(pos)
+               if self.Parent:
+                       src = self.Parent
+               else:
+                       src = self
+               return src.ClientToScreen(pos)
        
        
        def relativeCoordinates(self, pos=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]

Reply via email to