[pygtk] Problem with simple custom widget

Jeffrey Barish jeff_barish at earthlink.net
Fri Feb 15 14:39:20 WST 2008


As an exercise in preparation for bigger things, I am trying to create a
custom widget that is a gtk.Entry with an added label.  I borrowed
liberally from examples, but I am not aware of any examples that do quite
what I am trying to do.  I can make this widget work by subclassing gtk.Bin
and adding the entry as a child, but what I really want is to have
a "self-contained" widget.  I think that I am close, but I have two
problems (that I know about) that have me completely stumped.  The first is
that I can't get the label to appear, although there appears to be space
for it.  The second is that the entry does not resize when I resize the
window.  Any suggestions would be greatly appreciated.  I'm hoping that
creating custom widgets gets easier after the first one.
-- 
Jeffrey Barish
-------------- next part --------------
A non-text attachment was scrubbed...
Name: labelentry.py
Type: text/x-java
Size: 1939 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20080214/4e9d220e/labelentry.java


More information about the pygtk mailing list