[Glade-users] Problem with GtkBuilder

Alexey Kurochkin alexey.kurochkin at pathfinderlwd.com
Wed Oct 7 09:37:59 EDT 2009


On Wed, 2009-10-07 at 14:41 +0330, Aidin Gharibnavaz wrote:
> Hi!
> 
> I have a problem with glade, and GtkBuilder. I create a UI with glade,
> and load
> it in my python application, using following codes:
> 
>    builder = gtk.Builder();
>    builder.add_from_file("sample.glade")
>    
> It works nicely. But I can't add something to my containers using
> 'pack_start()',
> 'add_child()', or anything else. I do as following:
> 
>    builder.get_object('vbox1').add_child(mywidget)
> 
>  It don't throw any error, but also don't add 'mywidget' into the box.

Are you sure "add_child" is the right method? I don't know much of
python, but guessing from my C experience for boxes it should be
something like "pack_start".

>  Is it possible to do something like this?
>  The reason is that I have a custom widget, and I want to add it to my
> UI
>  using code. (I couldn't add it to Glade's catalog. Glade's Doc didn't
> help)
>  
>  Thanks in advanced.
> 
> _______________________________________________
> Glade-users maillist  -  Glade-users at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/glade-users




More information about the Glade-users mailing list