[Glade-users] Changing the border colour of text entry box

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 */
colormap = gdk_window_get_colormap(entry1->window);
gdk_color_alloc(colormap, &color);
gdk_window_set_background(entry1->window, &color);

/* 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.

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