[Glade-users] Colour of window and text insertion problem



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 at once. There are some way that allow
me to do both changes at once?

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
-- 
Crie o seu email gratuito no mail.pt
http://www.mail.pt





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