changing the color of a progress bar widget
- From: "Norris, Kendall P." <Kendall Norris Honeywell com>
- To: "'gtk-app-devel-list gnome org'" <gtk-app-devel-list gnome org>
- Subject: changing the color of a progress bar widget
- Date: Wed, 12 Dec 2001 10:38:57 -0700
I am using a progressbar to indicate the number of tests completed. I want
to change the color of the bar if any test fails and keep it that color i.e.
red. This will let the operator easily know a failure has occurred, from
across the room. I already have a color define as a GdkColor and used it to
set the colormap color. Here is the code, which compiles but crashes when
it tries to execute.
GdkColormap *fail_colormap;
GdkColor gdk_color_fail;
GtkWidget *pbar;
fail_colormap = gtk_widget_get_colormap(pbar);
if(gdk_color_change(fail_colormap, &gdk_color_fail))
{
gtk_widget_set_colormap(pbar, fail_colormap);
}
Thanks, Ken
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]