From 5431d8f69ac3ab7635afed2eca294ca1d4f12512 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Mon, 12 Sep 2005 06:32:05 +0000 Subject: [PATCH] Contributions/Patch from cesar2879@yahoo.com svn path=/trunk/gtk-sharp/; revision=49936 --- doc/en/Gtk/HBox.xml | 37 +++++++++++++++++++++++++++++++++++-- doc/en/Gtk/VBox.xml | 35 +++++++++++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 4 deletions(-) diff --git a/doc/en/Gtk/HBox.xml b/doc/en/Gtk/HBox.xml index e0b0c7417..f19a8b578 100644 --- a/doc/en/Gtk/HBox.xml +++ b/doc/en/Gtk/HBox.xml @@ -8,7 +8,40 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - An HBox is a specific type of for packing widgets horizontally. + An HBox is a specific type of for packing widgets horizontally. + + + + +using System; +using Gtk; + +class HBoxTester { + + static void Main () + { + Application.Init (); + Window myWindow = new Window ("HBox Widget"); + + HBox myBox = new HBox (false, 4); + + //Add some buttons to the horizontal box + AddButton (myBox); + AddButton (myBox); + + //Add the box to a Window container + myWindow.Add (myBox); + myWindow.ShowAll (); + Application.Run (); + } + + static void AddButton (HBox box) + { + box.PackStart (new Button ("Button"), true, false, 0); + } +} + + Other ways of laying out widgets include using a vertical box, (see ), a table, (see ), button boxes, etc. @@ -94,4 +127,4 @@ - + \ No newline at end of file diff --git a/doc/en/Gtk/VBox.xml b/doc/en/Gtk/VBox.xml index 0cdc51d96..d6b8a000f 100644 --- a/doc/en/Gtk/VBox.xml +++ b/doc/en/Gtk/VBox.xml @@ -8,7 +8,38 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - A VBox is a specific type of for packing widgets vertically. + A VBox is a specific type of for packing widgets vertically. + + +using System; +using Gtk; + +class VBoxTester { + + static void Main () + { + Application.Init (); + Window myWindow = new Window ("VBox Widget"); + + VBox myBox = new VBox (false, 4); + + //Add some buttons to the vertical box + AddButton (myBox); + AddButton (myBox); + + //Add the box to a Window container + myWindow.Add (myBox); + myWindow.ShowAll (); + Application.Run (); + } + + static void AddButton (VBox box) + { + box.PackStart (new Button ("Button"), true, false, 0); + } +} + + Other ways of laying out widgets include using a horizontal box, (see ), a table, (see ), button boxes, etc. @@ -94,4 +125,4 @@ - + \ No newline at end of file