[Gtk-sharp-list] Opening / Closing Windows

Met @ Uber met@uberstats.com
Tue, 09 Dec 2003 11:24:41 -0500

On Tue, 2003-12-09 at 00:38, Peter Williams wrote:
> On Mon, 2003-12-08 at 20:04, Met @ Uber wrote:
> > Within a glade file I have a Window widget which I don't want opened
> > until a specific event.  Upon that event I want to show it (.Show()
> > presumably) and then on closing the window by hitting the X or by
> > clicking "Close" I would like to destroy it.  Since this is an applet,
> > I'm guessing for memory purposes its better to create the Window and
> > then destroy it again?
> You might also check how Monodoc does its about box. That goes over
> creation and destruction, and also makes sure that the about box is
> unique too.
> Peter

Well I gave it a shot, and it almost works wonderfully.  I statically
create the Window as done for the About window in Monodoc.  And when the
Close button is clicked I call Hide().  When the window is called again
it opens perfectly without re-creating the window.  But when I call
Hide() on it through the window Destroy signal, and try to reopen it,
the window is malformed.  All I can see are the edges of the window, no
content -- approximately 4x20 pixels.  Any ideas why or how to fix this?

Also, how do I truly destroy a newly opened window from memory?

~ Matthew