tags:

views:

441

answers:

1

I'm using Mono with GTK# and am trying to display an existing window as a new tab in a GTK.Notebook. I'm currently re-parenting the widget to the notebook as follows:

MyWindow myWindow = new MyWindow();
myWindow.Children[0].Reparent(myNotebook)

Should I be doing this, or is there a better way to re-use an existing window so that you can display it on a tab?

+1  A: 

Your way is the best way, there's no way to embed windows into tabs without using horrible hacks like GtkPlug (which I'd guess you'd be uninterested in if you're using .NET). Look at the code to gnome-terminal for an example of how to do this.

John Millikin