[wxPython-users] How to get a validator to work in a frame

John Salerno johnjsal at gmail.com
Tue Aug 1 09:22:36 PDT 2006


> ---------- Forwarded message ----------
> From: Robin Dunn <robin at alldunn.com>
> To: wxPython-users at lists.wxwidgets.org
> Date: Tue, 01 Aug 2006 08:43:31 -0700
> Subject: Re: [wxPython-users] How to get a validator to work in a frame
> John Salerno wrote:
>
> > Thanks. So is Clone called implicitly? There's no call for it, even if
> > that's the reason __init__ is called twice. Could I just use a pass
> > statement in the Clone body, or does it need functionality?
>
> The validators are cloned when they are assigned to the control.  I
> agree that this doesn't make much sense from a Python perspective, but
> it does in C++.
>
> >
> > Also, do you know why it didn't work when I set the recursive flag and
> > called Validate on self?
>
> Validate doesn't do anything with self's validator, only the children's
> validators.  The recursive flag only causes it to also call the
> children's Validate method so the validators of the grandchildren will
> also be checked.
>
> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org  Java give you jitters?  Relax with wxPython!

Thanks so much for your help! This list is such a great resource.




More information about the wxpython-users mailing list