RE: setting background color of eventbox ... how?
- From: "Tom Liu" <tom liu flextrade com>
- To: "'Karl H. Beckers'" <karl h beckers gmx net>, <gtk-app-devel-list gnome org>
- Subject: RE: setting background color of eventbox ... how?
- Date: Wed, 21 Jan 2004 11:24:26 -0500
1)
colormap = gtk_widget_get_colormap(GTK_WIDGET(ebox));
if (gdk_color_parse("black", &g_col)){
if (gdk_colormap_alloc_color(colormap, &g_col, FALSE,
TRUE))
{
gtk_widget_modify_bg (GTK_WIDGET(ebox), GTK_STATE_NORMAL,
&g_col);
}
}
No effect ..
As Owen told us:
For all the gtk_*, use the RGB Color.
For All the gdk_*, use the alloced color.
For your example:
You don't need colormap and alloc_color.
You can fill the color by:
g_col.red=0;g_col.green=0;g_col.blue=0;
Then call
gtk_widget_modify_bg (GTK_WIDGET(ebox),
GTK_STATE_NORMAL,&g_col);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]