[wxPython-users] Event handling between two frame!

Raffaello Barella barbarossa.platz at gmail.com
Thu Aug 30 04:41:16 PDT 2007


My solution is to separate the handling of the event from the actual action,
e.g. I write this code in the main_frame:
    def On_EVT_LIST_ITEM_SELECTED(self, event):
         self.DoSomething()
         event.Skip()
    def DoSomething(self):
         print 1

In the second frame, you simply call the function DoSomething() thus:
         main_frame.DoSomething()
and if will print 1.

I admit it is rather rude, but it works. Bye



2007/8/30, Giuseppe Costanzi <G.Costanzi at idi.it>:
>
>
> Hi,
> How I could manage an event of a frame, from an another frame?
> I'm thinking a stuff like
>
> [module.name].[event.in.module.name]
>
> I need it because I would refresh from a frame some dataset that stay  in
> a=3D
> in another frame.For example, if I've a frame with a wx.ListCtrl that
> show=3D
> a list of  products and I open a second frame with the detaills of a=3D
> single product and I make some modify I like that this modify was show in=
=3D
> the first frame.To do this I'm thinking to use a def that stay in the=3D
> first frame calling it from the second frame.
> In pratice, my problem is how to call a function that is in a frame (in
> the=3D
> frame class) from another frame.
>
> Thank for you attention.
>
> Beppe
>
>
> ---------------------------------------------------
> Ai sensi della Legge 196/03 si precisa che le informazioni contenute in
> questo messaggio sono riservate ed a uso esclusivo del destinatario. Qual=
ora
> il messaggio Le fosse pervenuto per errore, la preghiamo di eliminarlo se=
nza
> copiarlo e di non inoltrarlo a terzi, dandocene gentilmente comunicazione.
> Grazie.
>
> This message, for the law 196/03, may contain confidential and/or
> privileged information. If you are not the addressee  you must not use,
> copy, disclose or take any action based on this message or any information
> herein. If you have received this message in error, please advise the sen=
der
> immediately and delete this message. Thank you for your cooperation
>
> E' nata IDICard, la carta prepagata ricaricabile sicura e flessibile,
> che ti offre agevolazioni e sostiene la ricerca scientifica ed i progetti
> umanitari dell'IDI Sanita'
> ---------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200708=
30/71eff9b2/attachment.htm


More information about the wxpython-users mailing list