[wxpython-users] Stuck in a problem with validators

David Anderson zerty.david at gmail.com
Thu May 1 03:32:32 PDT 2008


>From window put stuff in the box, I dont want to put, I want to get
And I've a clone method

On Wed, Apr 30, 2008 at 1:42 PM, Werner F. Bruhin <werner.bruhin at free.fr>
wrote:

> David,
>
>
> David Anderson wrote:
>
> > Hi you all
> > Well the thing is... i'm using a validator that do this
> >  def __init__(self, data, key):
> >         wx.PyValidator.__init__(self)
> >         self.data =3D data
> >         self.key =3D key
> > def TransferFromWindow(self):
> >         textCtrl =3D self.GetWindow()
> >         self.data[self.key] =3D textCtrl.GetValue()
> >         return True
> >
> > So i'll add the stuff in a dictionary..
> > The thing is, the stuff is only added to the dic data if I click on the
> > 'ok' button from the dialog,
> > but I want to access those info on the dic before closing the dialog...
> > Any ideas of how to solve this problem?
> >
> When you want to access it call dialog.TransferDataFromWindow(), doc for
> it:
> TransferDataFromWindow(self)
> Transfers values from child controls to data areas specified by their
> validators. Returns false if a transfer failed. If the window has
> wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will also
> call TransferDataFromWindow() of all child windows.
>
> Above doesn't show it, but you are aware that you need a Clone function in
> your validator?
>
> Werner
> _______________________________________________
> wxpython-users mailing list
> wxpython-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200805=
01/e50bfb11/attachment.htm


More information about the wxpython-users mailing list