I have something like this:
class ADialog(wx.Dialog):
def __init__(self, parent, *args, **kwargs):
...
self.editor = APanel(parent=self)
...
...
class APanel(wx.Panel):
def CreatePanel(self, *args, **kwargs):
...
self.textCtrls = []
for (key, val) in zip(foo, bar):
...
box = wx.TextCtrl(parent=self, value=val, validator=Validator())
....
Now, I need to have APanel seperate, because the text controls have to be changed dynamically.
Problem is, the Validate()
method of Validator
never gets called.
I've tried passing the flag wx.WS_EX_VALIDATE_RECURSIVELY
to wx.Dialog.__init__
, and also tried overriding the Validate()
method of ADialog to call Validate()
on APanel, and then overridden the Validate()
method of APanel to call the validators of each text control, but that didn't work either.
os: Windows 7
python version: 2.5.4
wxPython version: 2.8.10