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