Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19154 > unrolled thread

Extending PyGTK widgets with Glade

Started byRichard Carlson <rcarlson.cs@gmail.com>
First post2012-01-20 10:38 -0600
Last post2012-01-20 16:21 -0500
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  Extending PyGTK widgets with Glade Richard Carlson <rcarlson.cs@gmail.com> - 2012-01-20 10:38 -0600
    Re: Extending PyGTK widgets with Glade Adam Tauno Williams <awilliam@whitemice.org> - 2012-01-20 16:21 -0500

#19154 — Extending PyGTK widgets with Glade

FromRichard Carlson <rcarlson.cs@gmail.com>
Date2012-01-20 10:38 -0600
SubjectExtending PyGTK widgets with Glade
Message-ID<e9adnWKVkcvkBYTSnZ2dnUVZ_hudnZ2d@giganews.com>
I'm working on a program using PyGTK and Glade.  I create a glade XML file
using Glade Designer and then load widgets like this:

class MyDialog:
    def __init__(self):
        self.dialog = gtk.glade.XML(self.GLADEFILE).get_widget
("dialog.xml")

I think it would be better if I extended the Dialog class, but I can't 
figure out how to do it.  I'd like to do something like this:

class MyDialog(gtk.Dialog):
    def __init__(self):
        self = gtk.glade.XML(self.GLADEFILE).get_widget("example_dialog")

Can someone point me in the right direction?

Thanks,

Richard

[toc] | [next] | [standalone]


#19171

FromAdam Tauno Williams <awilliam@whitemice.org>
Date2012-01-20 16:21 -0500
Message-ID<mailman.4899.1327094468.27778.python-list@python.org>
In reply to#19154
Quoting Richard Carlson <rcarlson.cs@gmail.com>:
> I'm working on a program using PyGTK and Glade.  I create a glade XML file
> using Glade Designer and then load widgets like this:
> class MyDialog:
>     def __init__(self):
>         self.dialog = gtk.glade.XML(self.GLADEFILE).get_widget
> ("dialog.xml")
> I think it would be better if I extended the Dialog class, but I can't
> figure out how to do it.  I'd like to do something like this:
> class MyDialog(gtk.Dialog):
>     def __init__(self):
>         self = gtk.glade.XML(self.GLADEFILE).get_widget("example_dialog")
>
> Can someone point me in the right direction?

There is some documentation about this around somewhere; but I don't  
recall offhand.  In any case you will probably get a good answer if  
you ask on the pygtk maillist.
<http://www.daa.com.au/mailman/listinfo/pygtk>
Content on that list is pretty good.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web