[pygtk] gtk.entry sensitive and tooltips

vector vector180 at aanet.com.au
Mon Oct 24 14:01:29 WST 2005


Hi all
I have a little problem with making tooltips for a readonly entry box
Below is snippet of my code for making a read only box(this box is for 
read only data and is "greyed out" to inform the user its read only) 
however i still want the tool tip text to work

the routine, functions as expected except there is no tooltext. I 
commented out the line
        self.byte.set_sensitive(False)
and then i got tooltips as expected but of course now its not greyed..

any work around??

 
   def ro_box(self,value,size,tiptxt):
        """display box for read byte"""
        self.byte = gtk.Entry()
        self.byte.set_width_chars(size)
        self.byte.set_text(str(value))
        self.byte.set_editable(False)
        self.byte.set_sensitive(False)
        self.pack_start(self.byte, False, True)
        self.txttip.set_tip(self.byte, tiptxt, tip_private=None)


More information about the pygtk mailing list