]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/rightalign.py
Native wxControl::DoGetBestSize() implementation
[wxWidgets.git] / wxPython / wx / lib / rightalign.py
index f002373799a334a837cbfdf4ed78213b6eb73ec4..b0969b9a0e69f1fc82211d0aa3a3d8a68c0a6bd4 100644 (file)
 # o 2.5 compatability update.
 # o Added deprecation warning.
 #
 # o 2.5 compatability update.
 # o Added deprecation warning.
 #
+# 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxRightTextCtrl -> RightTextCtrl
+#
 
 """
 Some time ago, I asked about how to right-align
 
 """
 Some time ago, I asked about how to right-align
@@ -33,7 +37,7 @@ left-aligned if it has focus.
 Hope this can help someone, as much as this list helps me.
 
 Josu Oyanguren
 Hope this can help someone, as much as this list helps me.
 
 Josu Oyanguren
-Ubera Servicios Informรกticos.
+Ubera Servicios Informaticos.
 
 
 P.S.  This only works well on wxMSW.
 
 
 P.S.  This only works well on wxMSW.
@@ -60,7 +64,7 @@ warnings.warn(warningmsg, DeprecationWarning, stacklevel=2)
 
 #----------------------------------------------------------------------
 
 
 #----------------------------------------------------------------------
 
-class wxRightTextCtrl(wx.TextCtrl):
+class RightTextCtrl(wx.TextCtrl):
     def __init__(self, parent, id, *args, **kwargs):
         wx.TextCtrl.__init__(self, parent, id, *args, **kwargs)
         self.Bind(wx.EVT_KILL_FOCUS, self.OnKillFocus)
     def __init__(self, parent, id, *args, **kwargs):
         wx.TextCtrl.__init__(self, parent, id, *args, **kwargs)
         self.Bind(wx.EVT_KILL_FOCUS, self.OnKillFocus)
@@ -84,7 +88,7 @@ class wxRightTextCtrl(wx.TextCtrl):
 
         dc.SetTextForeground(fclr)
 
 
         dc.SetTextForeground(fclr)
 
-        dc.SetClippingRegion(0, 0, dcwidth, dcheight)
+        dc.SetClippingRegion((0, 0), (dcwidth, dcheight))
         dc.DrawText(text, (x, y))
 
         if x < 0:
         dc.DrawText(text, (x, y))
 
         if x < 0: