RE: Changing the foreground color of a progress bar



gtk_widget_modify_fg (widget, GTK_STATE_PRELIGHT, &color);

may work.


-----Original Message-----
From: gtk-app-devel-list-admin gnome org [mailto:gtk-app-devel-list-
admin gnome org] On Behalf Of Peter Krueger
Sent: Friday, February 27, 2004 10:22 PM
To: Douglas Phillipson
Cc: gtk-app-devel-list gnome org
Subject: Re: Changing the foreground color of a progress bar

On Fri, 27 Feb 2004, Douglas Phillipson wrote:
The archives seem to always point to:

  GdkColor color;

   gdk_color_parse ("red", &color);

   gtk_widget_modify_fg (widget, GTK_STATE_NORMAL, &color);

This works fine for the background color with:

   gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &color);

But the foreground color is unaffected by the "fg" version of this
API
call.  Has anyone seen a workaround for this problem?  Do I need to
resort to creating a custom progress bar?  Anyone done this?
Hello Douglas,
I never tried with a progress bar, but I made the experience that it
is
not always intuitive to decide which gtk_widget_modify_* function does
what you want for a given type of widget. Simply try the different
functions and also try a different state, if none of them should work
as you want with GTK_STATE_NORMAL.

Regards,
                 Peter
--
====================================================================
Peter Krüger

applied software solutions (appss) GmbH
Sandtorstr. 23
D-39106 Magdeburg
Germany

Phone:  +49-(0)391-54486-19388
Fax:    +49-(0)391-54486-19222
email:  krueger appss de
URL:    http://www.appss.de

Managing Director: Uwe Hess, Dietmar Schäfer
Register: HRB12386, AG Mageburg

"Virtual business becomes reality!"

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail.
Any
unauthorised copying, disclosure or distribution of the material in
this
e-mail is strictly forbidden.
====================================================================

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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