17 Jan 2004 13:31
about widget creation in libglade
Sridhar R <sridharinfinity <at> yahoo.com>
2004-01-17 12:31:33 GMT
2004-01-17 12:31:33 GMT
Hi,
I have one doubt regarding libglade. How is it
creating the widgets from glade file. It seems like
the widgets are created during creation of GladeXML
object.
gxml = glade.XML('pathtogladefile')
I am searching for a way to _apply_ glade file to
existing widget (which is already created).
I will make the above point clearer. Look at the
following pygtk example, which doesn't use libglade.
class MyWindow(gtk.Window):
def __init__(self):
super(MyWindow, self).__init__()
# any other stuffs like adding widgets
win = MyWindow()
win.show()
The main advantage of this style is `win` is actually
_is_ a widget (a gtk.Window). So I call win.show()
instead of doing tricks like win.widget.show(). But
is it possible to achieve this advantage, when using
glade file for generating the UI. NO! I tried the
following.
class MyWindow2(gtk.Window):
def __init__(self):
(Continue reading)
RSS Feed