looking for gtk.glade documenation

D

Dave Cook

does anyone have a website that covers gtk.glade?

I was going to point you to several linuxjournal.com articles, but they are
now restricting them to subscribers.

There's only a few things you need to know:

Creating an XML object:

xml = gtk.glade.XML("myapp.glade")

Getting a widget ref:

widget = xml.get_widget("foo")
widgets = xml.get_widget_prefix("foo")

Getting a widget name:

widget_name = gtk.glade.get_widget_name(widget)

Connecting callbacks to signals:

xml.signal_connect("on_foo", on_foo_callback, user_data)
xml.signal_autoconnect({"on_foo" : on_foo_callback})
xml.signal_autoconnect(foo_object)

The last example reads from foo_object.__dict__ to connect the callback.

Dave Cook
 
F

Francesco Bochicchio

Hi,
does anyone have a website that covers
gtk.glade?

Thanks in advance.

Dan

Try looking here:

http://developer.gnome.org/doc/API/libglade/libglade.html

As usual, when using a module wrapping an external library, you have to
search for documentation of the external library itself (in this case
libglade) and then rely on the fact that the author of the python modules
applied consistent "translation rules" between the API in the original
language (in this case C) and the API of the python module. Also,
reading example code and doing dir(module) and help(module) helps,
sometime.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top