[Vala] Gtk+-3.0 Gtk.Entry fontcolor



Hi everyone,

I try to change the color of the text in a Gtk.Entry.
I try it this way:

            Gdk.Color red;
            if(Gdk.Color.parse("RED",out red)==true);
                print("\that works"); // that gets printed

            if(my_entry.text.length >= 9 && !(my_entry.text[8].to_string()
== "-")){ //my_entry = Gtk.Entry

                print("\n I get to here"); // this also gets displayed
                my_entry.modify_text(my_entry.get_state(), red);
            }
The problem is, that the color doesn't change. It stays the same.
I'm using Gtk3

Regards

David


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