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)
[EMAIL PROTECTED] wrote:

> Send pygtk mailing list submissions to
>       [email protected]
> 
> 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
>       [EMAIL PROTECTED]
> 
> You can reach the person managing the list at
>       [EMAIL PROTECTED]
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of pygtk digest..."
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to