[pygtk] Re: Calling base class signal handler
Dede
ded.espaze at laposte.net
Sun Aug 12 16:02:42 WST 2007
Hi Marko,
You first need to inherit from gtk.EventBox in the
constructor. It will be:
class MyBox(gtk.EventBox):
def __init__(self, marko_args):
gtk.EventBox.__init__(self)
# do what you need
def do_button_press_event(self, event):
# ...
return self.do_button_press_event(self, event)
But you are going to do a recursion, I guess you want to do:
class MyBox(gtk.EventBox):
def __init__(self, marko_args):
gtk.EventBox.__init__(self)
# do what you need
def custom_button_press_event(self, event):
# ...
return self.do_button_press_event(self, event)
If you do not need to do something in the constructor, then you can
directly do:
class MyBox(gtk.EventBox):
def custom_button_press_event(self, event):
# ...
return self.do_button_press_event(self, event)
By the way, I am not sure that 'do_button_press_event' returns
something. This is probably:
class MyBox(gtk.EventBox):
def custom_button_press_event(self, event):
# ...
self.do_button_press_event(self, event)
I hope it helps,
Cheers,
Dede
On Thu, 9 Aug 2007 12:00:04 +0800 (WST)
pygtk-request at daa.com.au wrote:
> Send pygtk mailing list submissions to
> pygtk at daa.com.au
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://www.daa.com.au/mailman/listinfo/pygtk
> or, via email, send a message with subject or body 'help' to
> pygtk-request at daa.com.au
>
> You can reach the person managing the list at
> pygtk-owner at daa.com.au
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of pygtk digest..."
More information about the pygtk
mailing list