I am new to wxPython and I have a question that I have been unable to find the answer to while reading the demo code or searching the mail lists. I apologize if it has been asked and answered before. I do have the “wxPyton in Action” on order.
My GUI consists of a main window that has several buttons on it. Each button will open a new window that does its own thing, such as display telemetry data, or control the speed of a camera, etc. I would like the main GUI to know when the other windows have closed, so it can change the button state appropriately. I was wondering if someone can point me to a document that may describe how to accomplish this.
It could be that I am going about this the wrong way. Currently, I do something as follows to draw the new window:
My GUI consists of a main window that has several buttons on it. Each button will open a new window that does its own thing, such as display telemetry data, or control the speed of a camera, etc. I would like the main GUI to know when the other windows have closed, so it can change the button state appropriately. I was wondering if someone can point me to a document that may describe how to accomplish this.
Hello Steve,
You can do it calling self.GetParent().method_before_closing() from the child window. Or maybe I didn't understand the question.
Regards
Marcelo
···
--
Marcelo F. Fernández
Buenos Aires, Argentina
Licenciado en Sistemas - CCNA
I am new to wxPython and I have a question that I have been unable to find the answer to while reading the demo code or searching the mail lists. I apologize if it has been asked and answered before. I do have the "wxPyton in Action" on order.
My GUI consists of a main window that has several buttons on it. Each button will open a new window that does its own thing, such as display telemetry data, or control the speed of a camera, etc. I would like the main GUI to know when the other windows have closed, so it can change the button state appropriately. I was wondering if someone can point me to a document that may describe how to accomplish this.
It could be that I am going about this the wrong way. Currently, I do something as follows to draw the new window:
I use pubsub for this sort of thing. It allows me to send messages to any listener or listeners. Anyway, check out the following links for additional details:
-----Original Message-----
From: wxpython-users-bounces@lists.wxwidgets.org
[mailto:wxpython-users-bounces@lists.wxwidgets.org] On Behalf
Of Mike Driscoll
Sent: 03 March 2009 14:53
To: wxpython-users@lists.wxwidgets.org
Subject: Re: [wxpython-users] frame communication
Steve G wrote:
> Hello,
>
> I am new to wxPython and I have a question that I have been
unable to
> find the answer to while reading the demo code or searching
the mail
> lists. I apologize if it has been asked and answered
before. I do have
> the "wxPyton in Action" on order.
>
> My GUI consists of a main window that has several buttons
on it. Each
> button will open a new window that does its own thing, such
as display
> telemetry data, or control the speed of a camera, etc. I would like
> the main GUI to know when the other windows have closed, so it can
> change the button state appropriately. I was wondering if
someone can
> point me to a document that may describe how to accomplish this.
>
> It could be that I am going about this the wrong way.
Currently, I do
> something as follows to draw the new window:
>
> button event calls WfsCam
>
> def WfsCam (self, event):
> print "Starting WFS Cam..."
> self.wfs = wfscam.WFSCam (self, 125, 'WFS Camera')
> self.wfs.Show (True)
>
> Any advise is greatly appreciated!
>
> Thanks,
>
> Steve
I use pubsub for this sort of thing. It allows me to send messages to
any listener or listeners. Anyway, check out the following links for
additional details:
-----Original Message-----
From: wxpython-users-bounces@lists.wxwidgets.org [mailto:wxpython-users-bounces@lists.wxwidgets.org] On Behalf Of Mike Driscoll
Sent: 03 March 2009 14:53
To: wxpython-users@lists.wxwidgets.org
Subject: Re: [wxpython-users] frame communication
Steve G wrote:
Hello,
I am new to wxPython and I have a question that I have been
unable to
find the answer to while reading the demo code or searching
the mail
lists. I apologize if it has been asked and answered
before. I do have
the "wxPyton in Action" on order.
My GUI consists of a main window that has several buttons
on it. Each
button will open a new window that does its own thing, such
as display
telemetry data, or control the speed of a camera, etc. I would like the main GUI to know when the other windows have closed, so it can change the button state appropriately. I was wondering if
someone can
point me to a document that may describe how to accomplish this.
It could be that I am going about this the wrong way.
I use pubsub for this sort of thing. It allows me to send messages to any listener or listeners. Anyway, check out the following links for additional details: