Re: [Boa Constr] How to resolve values of a frame in boa
Status: Beta
Brought to you by:
riaan
From: Werner F. B. <wer...@fr...> - 2007-07-02 10:24:14
|
Hi Edgard, edgardalvescosta wrote: > Boa Friends > > I want calculate values of a frame in a other frame. Is this possible?? > > If it is possible which is the sintaxe to the second frame resolve the > values?? > > Some like that: > > Form1 > > x=selt.txtCtrl.GetValue() > > Form2 > > y=Form1.self.txtCtrl.SetValue(x) > y=self.txtCtrl.GetValue() Assuming that form1 and form2 have a common parent you could do something like this. in form2 val = self.parent.Form1.textctrl.GetValue() Or have a method in Form1. def GetTextCtrlVal(self): return self.textctrl.GetValue() val = self.parent.Form1.GetTextCtrlVal() Or you could use publisher/subsriber, see wxPython/wx/lib/pubsub.py Werner |