Hi,

You can use the methods ModifyBase and ModifyText of the Widget class.

------------------------------
myEntry.ModifyBase(StateType.Normal, new Gdk.Color(255,0,0));
myEntry.ModifyText(StateType.Normal, new Gdk.Color(0,255,0));
-----------------------------

Greetings.

El vie, 28-04-2006 a las 16:38 +0700, Agro Rachmatullah escribió:
> Is it possible to change the background and text color of a Gtk.Entry?
> If so, how?
> 
> My intention is to make the text of a Entry red if the user enters an
> invalid input (for example "foo" on an Entry that expects an integer).
> 
> (From hunting in Monodoc, it seems that it has to be something related
> to Gtk.Entry.Style. However the documentation is very minimal on that
> regard so I haven't made it work)
> 
> Thanks a lot.
> _______________________________________________
> Gtk-sharp-list maillist  -  [email protected]
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
-- 

----------------------
Daniel Valcarce Miranda

http://davamix.googlepages.com

Attachment: signature.asc
Description: Esta parte del mensaje está firmada digitalmente

_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to