[Gtk-sharp-list] Opening / Closing Windows

Peter Williams peter@newton.cx
Tue, 09 Dec 2003 18:09:34 -0500


Hi,

On Tue, 2003-12-09 at 11:24, Met @ Uber wrote:
> 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?

Oh, I remember running into that to. When you get a window manager
Destroy signal, the window is going to get destroyed even if you hide
it. I changed my handler to set the static member to null, so that the
window will be recreated when it's reopened.

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

window.Destroy () ought to do it, I think ... maybe window.Dispose (). I
forget how Gtk# handles that.

Peter

-- 
Peter Williams                          peter@newton.cx

"[Ninjas] are cool; and by cool, I mean totally sweet."
                              -- REAL Ultimate Power