I wanted to call a function of a parent widget.
My first try was to GetParent(), but this returns a pointer to the widget.
How can i than call the function?
self.GetParent().<function>() doesn't work.
My solution is to save th eparent in self.parent at initialisation of the
widget. This works but i think GetParent should work to, but i don't know
how to call a functino of a pointer, like '->' in c/c++
You have hit on a fundamental problem that Robin is at least one step of two
towards solving. Take a look at the OOR section in the Misc in the demo for
more.
Nigel
···
----- Original Message -----
From: "Mirko Koenig" <koenig@v-i-t.de>
To: <wxPython-users@lists.wxwindows.org>
Sent: Thursday, December 05, 2002 11:35 AM
Subject: [wxPython-users] newbie: call a function of a parent widget
Hi
I wanted to call a function of a parent widget.
My first try was to GetParent(), but this returns a pointer to the widget.
How can i than call the function?
self.GetParent().<function>() doesn't work.
My solution is to save th eparent in self.parent at initialisation of the
widget. This works but i think GetParent should work to, but i don't know
how to call a functino of a pointer, like '->' in c/c++
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
I wanted to call a function of a parent widget.
My first try was to GetParent(), but this returns a pointer to the widget.
How can i than call the function?
self.GetParent().<function>() doesn't work.
My solution is to save th eparent in self.parent at initialisation of the
widget. This works but i think GetParent should work to, but i don't know
how to call a functino of a pointer, like '->' in c/c++
This looks like too old version of wxPython. I have no problems with 2.3.3
I wanted to call a function of a parent widget.
My first try was to GetParent(), but this returns a pointer to the widget.
How can i than call the function?
self.GetParent().<function>() doesn't work.
It should. What version of wxPython are you using?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!