[pygtk] composite-child

Chris Camacho chris_camacho at yahoo.com
Fri Jul 24 16:46:04 WST 2009


I'm putting together a simple combined code editor and user interface editor

The label inside for example a gtkButton returns False when its composite-child
property is queried.

Isn't the label of a button supposed to return true for this?

If not what is composite-child for?

here ui.button1 is a gtkButton instance

print ui.button1.get_child().get_property("composite-child")
print ui.button1.get_child().class_path()
False
GtkWindow.GtkFixed.GtkEventBox.GtkButton.GtkLabel

at the moment i'm comparing the name with the class of the widget
w.class_path().split(".")[-1]!=w.get_name()
to see if its part of a widget (so I can ignore it)

This only works as the name of these child widget is automatically named with
its class BUT I can see this changing and its generally poor practice...

TIA
Chris




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20090724/de110fd3/attachment.htm 


More information about the pygtk mailing list