tags:

views:

58

answers:

2

I'm working on a project that has a glade GUI.

I need the main window to have 2 section, divided by a gtk.Hpaned widget (horizontal panes).

The left pane would have a tool-bar like layout of buttons, maybe 3 or more.

What I need is a way to create different windows and display them on the right pane of the main window. This way, when I click button 1, subwindow1 will appear in the right pane. Click button2, subwindow2 will appear on the right pane.

Instead of having windows pop-up left and right, I want to reparent them to the right pane of this gtk.Hpaned widged.

How do you do this in python with pygtk?

+1  A: 

Do you try this?

gtk.Widget.reparent(new_parent)

The reparent() method moves a widget from one gtk.Container to another.

mkotechno
Ok, That kinda sorta does the trick, but not exactly what I was looking for...But I guess it will do, so I'll take it.Thanks
M0E-lnx
A: 

Instead of creating windows you could put a notebook in the right pane. Then create all the previous windows as pages. Click on the button can then show the appropriate page in the notebook.

Rob