I've subclassed wx.TextCtrl in order to add some special editing features. Originally, I thought I was just going to use XRC to define all my dialogs. Following the example in the demo, I made the constructor for my control look like this:
class MyTextCtrl(wx.TextCtrl):
def __init__(self):
t = wx.PreTextCtrl()
self.PostCreate(t)
Now, however, I find I also need to create an instance of MyTextCtrl without using the XML resources. I.e. I want to be able to do the equivalent of this:
x = MyTextCtrl(parent, -1)
How can I make a custom control that can be used both with XRC and with the usual (single-stage) construction method?
···
--
Joe