[Glade-users] Changing the border colour of text entry box
duarte
duarteduque@yahoo.com.br
Mon, 17 Mar 2003 11:24:22 -0000
Dear List Members,
I'm trying to make a text entry box that could display some text and change
the colour of the border. These changes (text entry, and border colours)
will be made by a gtk_timeout_add function that will execute every second.
I am able to do only one of these things.
If I change the border colour of the text entry box and change the text, the
colour of the border will return to the original default colour. Why?
There are some way that allow me to do both changes?
An extraction of the code of the gtk_timeout_add function:
gint function(gpointer user_data)
{
GdkColormap *colormap;
GdkColor color;
.
/* Colour change */
color.red=0xffff;
color.green=0;
color.blue=0;
colormap = gdk_window_get_colormap(entry1->window);
gdk_color_alloc(colormap, &color);
gdk_window_set_background(entry1->window, &color);
gdk_window_clear(entry1->window);
/* Text insertion */
gtk_entry_set_text(GTK_ENTRY(entry1), "hello world");
return 1;
}
Best Regards,
Duarte Duque
_______________________________________________________________________
Busca Yahoo!
O serviço de busca mais completo da Internet. O que você pensar o Yahoo! encontra.
http://br.busca.yahoo.com/