[pygtk] Contant height of GtkProgressBar
Paul Pogonyshev
pogonyshev at gmx.net
Sat May 10 03:08:57 WST 2008
Mitko Haralanov wrote:
> In my application (GUI designed using Glade2), I have a progress bar
> that is used by multiple parts of the app.
>
> Some of the parts display text in the progress bar and others done. The
> problem that I am having is that the height of the progress bar changes
> when there is text displayed and when there isn't. This causes
> re-drawing of the application and is really annoying.
>
> Is there a way that I can prevent this from happening, either by
> changing the font used by the progress bar or by having the widget
> height be calculated in a permanent way?
Well, one idea is to connect to size-request signal on that progress
bar and to ensure it requests at least some height X. For example,
you can ensure that height request never goes down in an instance of
your app. That way you will have at most one height change (I
guess) --- if it is first without text, then with text and thus
higher.
Paul
More information about the pygtk
mailing list