Re: Centering Text Within StatusBar



On Wed, 2002-11-13 at 15:54, Mike Dailey wrote:
Can anyone point me to the correct info. on centering
text within a statusbar?  Is it even possible (nothing
I've found in the API references or GTK tutorials
mention it)?  

If it is not possible, would it be just as easy to
create an HBOX, and place a centered text label within
it to "mimic" a statusbar?

The label property of the GtkStatusbar is afaik not a public one so the
people on this list will kill, eat and demolish me for telling you. But,
the label in a GtkStatusBar is just a member of the _GtkStatusbar
struct. So you can access it using "yourstatusbar->label"

Then you can use all GtkLabel functions on it

So :
http://developer.gnome.org/doc/API/2.0/gtk/GtkMisc.html#gtk-misc-set-alignment
http://developer.gnome.org/doc/API/2.0/gtk/GtkLabel.html#gtk-label-set-justify

I have no idea why they don't create a simple macro in GtkStatusbar.h
and add documentation about it .. 

I am also stunned why it is not possible to push any widget type to a
GtkStatusbar using the API. I can give enough examples of very popular
applications that push progressbars and icons on the statusbar :-\
(browsers).

Until such stuff happens, all we can do is make hacks.. I guess. Please
do correct me if I am wrong : I would like to know about it too if both,
adding widgets of any type and getting the label, is possible using the
normal API.


-- 
Philip van Hoof aka freax (http://www.freax.eu.org)
irc: irc.openprojects.net mailto:me at freax dot org
Go not to the Elves for counsel, for they will say both no and yes.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]