[pygtk] Dividing the StatusBar
Hans-Joachim Widmaier
hjwidmaier at web.de
Fri Oct 12 15:40:17 WST 2007
Yesterday I had the urge to provide users of my download utility with a ProgressBar
to give a hint as to how things were going. I already had a StatusBar, and it seemed
like the perfect place to put it in. Reading the Docs showed that there wasn't a way
to do that. Until I saw in the Widget Hierarchy that StatusBar is derived from HBox.
So I added 3 simple lines to my application:
self.progbar = gtk.ProgressBar()
self.progbar.set_size_request(100, -1)
self.statusbar.pack_start(self.progbar, False, True, 0)
It worked. It worked first time perfectly - now if that ain't gonna make you
suspicious!
As it isn't documented, this must be considered a hack. Any guesses as to whether
this will stay working with future versions of GTK+?
Regards,
Hans-Joachim
_________________________________________________________________________
In 5 Schritten zur eigenen Homepage. Jetzt Domain sichern und gestalten!
Nur 3,99 EUR/Monat! http://www.maildomain.web.de/?mc=021114
More information about the pygtk
mailing list