From b0c973ebe0bb358aadd22251d49e45167a9257d8 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Tue, 20 Sep 2005 18:16:16 +0000 Subject: [PATCH] Patch from cesar2879@yahoo.com svn path=/trunk/gtk-sharp/; revision=50316 --- doc/en/Gtk/Window.xml | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/doc/en/Gtk/Window.xml b/doc/en/Gtk/Window.xml index a987a8347..ddc4b63f0 100644 --- a/doc/en/Gtk/Window.xml +++ b/doc/en/Gtk/Window.xml @@ -8,7 +8,36 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - Toplevel which can contain other widgets. + Toplevel which can contain other widgets. + + + + +using System; +using Gtk; + +class WindowTester { + static void Main () + { + Application.Init (); + Window myWindow = new Window ("This is a window"); + myWindow.DeleteEvent += OnDelete; + myWindow.SetDefaultSize (200, 200); + + //Put a button in the Window + Button button = new Button ("Click"); + myWindow.Add (button); + myWindow.ShowAll (); + Application.Run (); + } + + static void OnDelete (object o, DeleteEventArgs e) + { + Application.Quit (); + } +} + + Toplevel which can contain other widgets. @@ -1883,4 +1912,4 @@ Sometimes when you think you want to use allow_shrink, the real problem is that - + \ No newline at end of file