A S�b, 2004-02-21 �s 19:52, Gary Jaffe escreveu:
> I have a server running pygtk-0.6.9 and gtk-1.2.9 on Redhat 7.1 with
> python-1.5.  I am trying to change the text and background color of a
> label on a button.  But when I do
> 
> button = gtk.GtkButton("Old Text")
> button.set_label("New Text")
> 
> I get 'AttributeError: set_label'.
> 
> This works on my Libranet system at home which has pygtk-2.0.0 and
> gtk-2.2.4.  Is there some way I can do this with my old version of
> pygtk, or am I stuck trying to upgrade everything on my server?

Gtk 1.2 is so old I don't even remember the API very well. :)
Anyway, I think this workaround should work: 
        button.child.set_text("New Text")
If button.child doesn't work, try button.get_child().

> 
> Thanks for any assistance.
> 
> Gary
> _______________________________________________
> pygtk mailing list   [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Gustavo J. A. M. Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>

_______________________________________________
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