|
From: Jussi S. <jus...@pp...> - 2006-10-06 08:10:19
|
I'll try to answer your question, though you never bothered to comment
on my suggested "solution" to your earlier request concerning
multilingual GUIs.
Cullen Newsom wrote:
> So I have taken testNotebook.py and added some stuff. in one of the
> child windows, I have:
> def on_initialize(self, event):
> self.parent=self.getParent()
>
> as mentioned in
> Python24/Lib/site-packages/PythonCard/docs/html/walkthrough3.html
> this is what I get:
>
I doubt walkthrough3 has got nothing to do with tabsheets, though the
term childwindow appears in tabsheet terminology also.
I had the same problem also. After a considerable number of hours
wandering in total darkness I found the way that seems to work for me at
least. In the initalizers for the individual tabsheets I do:
# fr becomes the pointer to the wxframe window
self.fr = self.GetParent().GetParent().GetParent()
Then in my code I can say
self.fr.showMsg(0, 'Maximum points per item can only be given for
test type 2')
when I want to use the message function showMsg defined in the "main"
class which only has to know how to use the message field outside of the
tab sheet area. Or:
self.fr.maxPnts = 100
to set the value of the attribute maxPnts in the "main" class or:
self.fr.test.readFromDisk(path)
to refer to an instance of a separate Test class to use its readFromDisk
method.
Cheers,
Jussi
http://personal.inet.fi/cool/operator/
|