How to change GTK+3 label color dynamically



Please help me. I don't see nothing with web to change label color 
dynamically but i need this urgent

THanks again!


On 16-03-2017 09:55, Rúben Rodrigues wrote:
Hi,

THanks. This is dynamically? I need in c language if possible :S

Thanks


On 16-03-2017 07:29, Stefan Salewski wrote:
On Wed, 2017-03-15 at 15:11 +0000, Rúben Rodrigues wrote:
Hi,

Now i need to change GtkLabel color dinamically, so i thing that i
can't
use Css to do this.. I do this in Gtk2:

gtk_widget_modify_fg(GTK_WIDGET(gtk_builder_get_object(builder,"label
")),GTK_STATE_NORMAL,
&white);

How can i change the color in Gtk3?

   
You can do it with CSS. But it has changed a bit for 3.20. You may
compare this thread:

https://mail.gnome.org/archives/gtk-list/2016-November/msg00006.html

Well, that was not for label widget, but for tooltip. But label widget
should behave similar. And with similar code I once set foreground and
background for button widgets -- I had that working for 3.18, but I
have not yet fixed that for 3.20. (https://github.com/ngtk3/nim-gtk3/bl
ob/master/test/colors.nim)
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



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