A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/102010.html below:

Help for access method of wxPython object

Help for access method of wxPython object Help for access method of wxPython objectFranz GEIGER fgeiger at datec.at
Tue Apr 24 14:56:17 EDT 2001
Had a similar problem. Thanks to Robin Dunn, he showed me how to solve it:
You have to use Getters like this, to access the control:

def GetTextctrlText(self):
   return wxPyTypeCast( self.FindWindowById(ID_TEXTCTRL_TEXT),
"wxTextCtrl" )

wxDesigner(), which I really can recommend, did this for me by a simple
button click.

See the related thread on this:
http://groups.google.com/groups?hl=en&lr=&safe=off&ic=1&th=40bf7162e9580db9&
seekd=909081131#909081131

Hope this helps.

Best Regards
Franz GEIGER

"Neotaku" <neotaku at free.fr> wrote in message
news:CieF6.475$6H6.2077927 at nnrp3.proxad.net...
>
> Hello,
>
>     Here is my problem, i take an object control from a windows like this
>     obj = self.GetChildren()[26]
>     print obj.GetName()
>
>     self is a windows and the 26th object is a textcontrol. so this code
> work well and i can get the control's name but when i want to do that :
>     obj.SetValue("Testing")
>
>     i have always this error : AttributeError : 'wxWindowPtr' instance has
> no attribute 'SetValue'
>     i don't understand why it doesn't work ? the only way it can work is
> like this : self.MyTextCtrl.SetValue("Testing")
>
> Thanks a lot for you help
>
> Using : wxPython, Boa Constructor, NT4 Win32
>



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4