[pygtk] Again with the MDI-like approach (sorry :-)
wildemar at freakmail.de
Mon Jun 19 05:00:51 WST 2006
Hey there :)
OK, I have struggled with this for a while now.
I'm still trying to write my notes-application but I just cant figure
out how to have several notes open within the same Window.
You see, somewhat like MDI-windows. Several boxes, freely placable and
resizable. They needn't look like ordinary windows, but they need to be
able to contain other widgets (a box or table at least) in the usual manner.
I tried forming these windows out of visible EventBoxes contained in a
Layout; I managed to have them contain other widgets; they were movable
and resizable. But they were a pain to program (tons of code), they
looked ugly and "unstable". Which they were, because they are a hack by
a GUI idiot (me ;)).
I'm now experimenting with gdk.Windows as children of a Layout.window.
Surprisingly this seems to work. By applying the usual Window decoration
to them, they are now mini-Windows inside a scrollable Layout. Great!
But how do I add Widgets to the "client area" of such windows. I know a
gdk.Window isn't a Widget, let alone a Container or Bin, so I fear I
have to implement some mechanism that make my Windows behave like
What do you think? Can I avoid it? Any other Ideas for getting MDI
Windows. Is there a canned solution somewhere? wxWidgets has MDI (I used
it before) so it must be possible with GTK.
Any help much appreciated. :)
More information about the pygtk