[pygtk] gui things....

Martin Franklin martin.franklin@waii.com
Fri, 11 Aug 2000 15:10:01 +0100


Hi,

I have attempted to write a (Pmw ish) widget like so...

class MyEntry:
    def __init__(self, text='', command=None):
        self.showit(text=text, command=command)
        
    def showit(self, text, command):
        box = GtkHBox(spacing=10)
        box.set_border_width(10)
        label = GtkLabel(text)
        box.pack_start(label)
        label.show()
        self.entry = GtkEntry()
        self.entry.set_text("")
        box.pack_start(self.entry)
        self.entry.show()
        self.entry.connect("activate", command)
        return box
    
    def get_text():
        return self.entry.get_text()


Ok so it doesn't work... (won't pack)

My question is has anyone got any good examples of tha above sort of
stuff 
the pygtk-0.6.5/examples don't really deal with subclassing and creating 
`mega` widgets etc

Thanks in advanced
Martin.