Re: [gtk-list] How to colour an entry widget?
- From: Mario Motta <mmotta guest net>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] How to colour an entry widget?
- Date: Sat, 12 Sep 1998 09:15:51 +0200
On Sat, 12 Sep 1998, Ted Lemon wrote:
>I'd like to make some of my entry widgets different colours, so that
>they'll stand out. I've found that if I try to do the following to
>set the style, it sets the colour of the border, not of the actual
>widget:
>
> gtk_widget_set_style (GTK_WIDGET (GTK_EDITABLE (es -> widget)),
> style);
>
>Can anybody clue me in on why this is doing the wrong thing?
>
> _MelloN_
>
if you mean th entry bg color, here what i did:
-------- cut here ---------
GtkWidget *text_field;
//.....
GdkColor color_black;
GdkColormap *cmap;
color_black.red = 0;
color_black.green = 0;
color_black.blue = 0;
cmap = gdk_colormap_get_system ();
gdk_color_alloc(cmap, &color_black)
if(!GTK_WIDGET_REALIZED(text_field))
gtk_widget_realize(text_field)
gdk_window_set_background (GTK_TEXT (text_field)->text_area, &color_black);
-------- cut here ----------
(this topic was already answered few days ago).
hope this help.
friendly
Mario Motta
===========
AI Research Group - Rimini
mmotta@guest.net
http://www.guest.net/homepages/mmotta/index.htm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]