[Glade-users] Re: [pygtk] adding plot widget to a GLADE/Py-Gtk application
James Henstridge
james@daa.com.au
Tue, 21 Aug 2001 14:13:02 +0800 (WST)
On Mon, 20 Aug 2001, Christian Robottom Reis wrote:
> On Wed, 27 Jun 2001, Joe Van Andel wrote:
>
> > I'm building an application using PyGtk with the UI built by glade. At
> > runtime, I use libglade to create the widgets in the glade XML file.
> > The application needs to use the GtkPlot() widget provided by GtkExtra.
> > How do I do this?
>
> You can try using the KUI (alpha name) package I've pre-released as
> http://www.async.com.br/~kiko/KUI-0.3.9.tar.gz and checking out the UI
> module and the example provided. It does embedding of a native PyGTK
> widget into a libglade interface. It's not very smart or pretty, but it's
> simple and it works.
>
> > Glade's 'Custom' widget looks like it might help, but I don't know how
> > to define the Python class or procedure necessary to create a GtkPlot
> > widget within the Glade framework. I tried adding a 'Custom' widget,
> > and setting the 'Creation Function' to 'create_plot', which I defined as
> > a Python function.
>
> AFAICT the Custom widget wasn't wrapped for pygtk-1.2. By the looks of it,
> it won't be, either, right James?
It is actually possible to wrap the custom widget code in libglade since a
few versions ago. The code is just missing from the wrapper at the
moment. It is one of the things on the list for the next stable pygtk
release.
James.