At 3:05 PM +1000 12/13/05, vector wrote:
>hi im trying to set the color of either the bg or the text in  a
>gtk.Entry box,  if "prompt" has text in it. code below.
>i cant seem to work out how to change the color tho?
>
>
>    def dem_entry(self,length,x,y,tiptxt):
>        """entry box for dem"""
>        self.dem = gtk.Entry()
>        self.dem.set_max_length(length)
>        self.dem.set_size_request(x,y)
>        self.dem.connect("activate", self.handle_dem_entry)
>        self.pack_start(self.dem, False, True)
>        if self.prompt!="":
>            self.dem.modify_bg(gtk.gdk.Color(0,0,0))
>        self.txttip.set_tip(self.dem,tiptxt, tip_private=None)

Gosh, I answered a very similar question just a few hours ago.  modify_base
or modify_text in the Widget class, and watch your state.
____________________________________________________________________
TonyN.:'                       <mailto:[EMAIL PROTECTED]>
      '                              <http://www.georgeanelson.com/>
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to