how control when a child frame is closed?

Hi all
I'm a newbie in wxpython & boa
I've an wxapp1 and wxframe1.

From wxframe1 I create and instance of a wxframe2.

In that wxframe2 I make some changes in the configuration of the main
program.
When i press a button in the child window, i must do something, obviously,
but i want make something too in the parent window.
How can i comunicate child with parent??
thanks

**AVISO DE CONFIDENCIALIDAD**
La información contenida en este mensaje y archivos es privada y confidencial estando dirigida solamente al destinatario. Si Ud. ha recibido esta información por error, por favor, proceda a su inmediata destrucción. Cualquier opinión o punto de vista contenido en este mensaje corresponde al remitente y necesariamente no representa la opinión del GRUPO XEROX.

**CONFIDENTIAL HEADER**
This email and any files are private and confidential and intended solely for the use of the addressee(s). If you have received this e-mail in error please delete it immediately. Any views or opinions presented in this e-mail are solely those of the sender and do not necessarily represent those of XEROX GROUP.

When you create the child, pass it a reference to the parent. Have the
child save that reference, and work with that. You could also keep and
Arch-Module and have a global there as a reference to the main window.
I'm not quite sure what you're trying to do, though.

···

On Tue, 14 Sep 2004 10:49:02 +0200, enrique <enrique.palomo@xgs-spain.com> wrote:

Hi all
I'm a newbie in wxpython & boa
I've an wxapp1 and wxframe1.
From wxframe1 I create and instance of a wxframe2.
In that wxframe2 I make some changes in the configuration of the main
program.
When i press a button in the child window, i must do something, obviously,
but i want make something too in the parent window.
How can i comunicate child with parent??
thanks

The simplest thing to do is call a method of the child's parent after
the configuration is complete. You want to use wx.CallAfter, passing
it the parent's method to be called:

  # some methond in the child
  def on_ok(self, e):
      # Assuming you passed the parent into the ctor...
      parent = self.GetParent()
      wx.CallAfter( parent.method_to_call )

Not tested, but I think that will work and is the path of least resistance.

jw

···

On Tue, 14 Sep 2004 10:49:02 +0200, enrique <enrique.palomo@xgs-spain.com> wrote:

Hi all
I'm a newbie in wxpython & boa
I've an wxapp1 and wxframe1.
From wxframe1 I create and instance of a wxframe2.
In that wxframe2 I make some changes in the configuration of the main
program.
When i press a button in the child window, i must do something, obviously,
but i want make something too in the parent window.
How can i comunicate child with parent??
thanks

**AVISO DE CONFIDENCIALIDAD**
La información contenida en este mensaje y archivos es privada y confidencial estando dirigida solamente al destinatario. Si Ud. ha recibido esta información por error, por favor, proceda a su inmediata destrucción. Cualquier opinión o punto de vista contenido en este mensaje corresponde al remitente y necesariamente no representa la opinión del GRUPO XEROX.

**CONFIDENTIAL HEADER**
This email and any files are private and confidential and intended solely for the use of the addressee(s). If you have received this e-mail in error please delete it immediately. Any views or opinions presented in this e-mail are solely those of the sender and do not necessarily represent those of XEROX GROUP.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org