[EMAIL PROTECTED] wrote: > On 4/24/06, *Tony Nelson* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > I just use entry.modify_fg( gtk.STATE_NORMAL, > gtk.gdk.Color(0xFFFF, 0, 0) > ). Also, modify_base does the background. > > > > Hi, > Thank you for your answer Tony, these two functions may prove usefull > indeed ! > But unfortunately it works neither with my real application nor with > the example I put in my previous mail :-( > I have tried to modify the first argument of 'modify_fg' (the state of > the widget) but it didn't work any better. > > # File modified_example.py > import gtk > import pango > > def entry_changed_callback(entry): > entry.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color(0xFFFF, 0, 0)) > > > window=gtk.Window() > > entry = gtk.Entry() > entry.connect('changed', entry_changed_callback) > > window.add(entry) > window.show_all() > > gtk.main() > # End of file > > Any idea of what's going wrong ? > -- > Remi > ------------------------------------------------------------------------ > > _______________________________________________ > pygtk mailing list [email protected] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ > Hi
change 'modify_fg' to 'modify_base' as suggested by Tony Your example works ok with me. As sonn as you start entering text the colour changes. Cheers _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
