List Info

Thread: RE: Catch events from other columns in wx.ListCtrl




RE: Catch events from other columns in wx.ListCtrl
country flaguser name
United States
2007-06-28 08:55:53
 

> -----Original Message-----
> From: Gre7g Luterman [mailto:hafelielyahoo.com] 
> Sent: Tuesday, June 26, 2007 9:46 AM
> To: wxPython-userslists.wxwidgets.org
> Subject: Re: [wxPython-users] Catch events from other
columns 
> in wx.ListCtrl
> 
> --- Mike Driscoll <mdriscollco.marshall.ia.us>
wrote:
> 
> > I found the pubsub module actually does what I
needed. I'm not sure 
> > how I would go about catching an event that is
thrown in a separate 
> > module anyway.
> 
> That's the beauty of events.  The code that wants to
catch 
> the events tells wxPython to bind it, and then it
doesn't 
> matter what code posts the events.  The events could
come 
> from the same module, a different module, or whatever. 
It 
> will all look the same to the event handler.
> 
> Greg
> 
> 
>        
>
____________________________________________________________
__

I understand the theory of what you say, but I don't know
how to execute
it. I tried the following:

<code>

def OnEditOptions(self, event):
        
       frm = Options(configLst)
       frm.Bind(wx.EVT_CLOSE, self.OnOptionsClosed)
       frm.Show()

def OnOptionsClosed(self, event):
        print 'in OnOptionsClosed!'

</code>

This only causes my print statement to execute. It doesn't
close the frame
that I called. If I told the handler in the opened frame to
close and did
an event.skip(), wouldn't that propagate the EVT_CLOSE to
the calling app
and cause it to be closed as well?

I only started Python just over a year ago and didn't get
into wxPython
until Sept. or Oct. 2006. 

Thanks,

Mike


------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribelists.wxwidgets.org
For additional commands, e-mail: wxPython-users-helplists.wxwidgets.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )