[pygtk] Re: Problem with simple custom widget

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Feb 18 08:23:28 WST 2008


Jeffrey Barish wrote:
> And it's clear why you wanted to
> inherit from Entry considering all the methods that have to delegate to
> methods in Entry.

If you put something like this in your top level class:

   def __getattr__(self, name):
     return getattr(self.entry, name)

then any method or attribute lookups that aren't satisfied
by your class will be automatically redirected to the
Entry widget.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | Carpe post meridiem!          	  |
Christchurch, New Zealand	   | (I'm not a morning person.)          |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+


More information about the pygtk mailing list