+class PreMaskedTextCtrl( BaseMaskedTextCtrl, MaskedEditAccessorsMixin ):
+ """
+ This allows us to use XRC subclassing.
+ """
+ # This should really be wx.EVT_WINDOW_CREATE but it is not
+ # currently delivered for native controls on all platforms, so
+ # we'll use EVT_SIZE instead. It should happen shortly after the
+ # control is created as the control is set to its "best" size.
+ _firstEventType = wx.EVT_SIZE
+
+ def __init__(self):
+ pre = wx.PreTextCtrl()
+ self.PostCreate(pre)
+ self.Bind(self._firstEventType, self.OnCreate)
+
+
+ def OnCreate(self, evt):
+ self.Unbind(self._firstEventType)
+ self._PostInit()
+
+i=0
+## CHANGELOG:
+## ====================
+## Version 1.1
+## 1. Added .SetFont() method that properly resizes control
+## 2. Modified control to support construction via XRC mechanism.