From e2b1f2b6b156f3d11b8d6ca51a33fa660e2e5dd8 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Thu, 15 Mar 2007 15:25:19 +0000 Subject: [PATCH] Contributions from cesar2879@yahoo.com svn path=/trunk/gtk-sharp/; revision=74378 --- doc/en/Gtk/HBox.xml | 32 +++++++++++++++++++++-- doc/en/Gtk/VBox.xml | 64 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 92 insertions(+), 4 deletions(-) diff --git a/doc/en/Gtk/HBox.xml b/doc/en/Gtk/HBox.xml index 73ead7c6a..94384d828 100644 --- a/doc/en/Gtk/HBox.xml +++ b/doc/en/Gtk/HBox.xml @@ -21,7 +21,6 @@ class HBoxTester { { Application.Init (); Window myWindow = new Window ("HBox Widget"); - HBox myBox = new HBox (false, 4); //Add some buttons to the horizontal box @@ -39,6 +38,35 @@ class HBoxTester { box.PackStart (new Button ("Button"), true, false, 0); } } + +Imports System +Imports Gtk + +Class HBoxTester + Shared Sub Main () + Application.Init () + Dim myWindow As New Window ("HBox Widget") + + Dim myBox As New HBox (False, 0) + + ' Add the box to a Window container + myWindow.Add (myBox) + myWindow.SetDefaultSize (250, 40) + + ' Add some buttons to the box + HBoxTester.AddButton (myBox) + HBoxTester.AddButton (myBox) + HBoxTester.AddButton (myBox) + + myWindow.ShowAll () + Application.Run () + End Sub + + Shared Sub AddButton (ByVal box As HBox) + box.PackStart (New Button ("Button"), True, False, 0) + End Sub +End Class + Other ways of laying out widgets include using a vertical box, (see ), a table, (see ), button boxes, etc. @@ -125,4 +153,4 @@ class HBoxTester { - + \ No newline at end of file diff --git a/doc/en/Gtk/VBox.xml b/doc/en/Gtk/VBox.xml index ff24e7800..d4bdddfa0 100644 --- a/doc/en/Gtk/VBox.xml +++ b/doc/en/Gtk/VBox.xml @@ -9,7 +9,67 @@ 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. - + +using System; +using Gtk; + +class VBoxTester { + + static void Main () + { + Application.Init (); + Window myWindow = new Window ("VBox Widget"); + myWindow.SetDefaultSize (250, 100); + + VBox myBox = new VBox (false, 4); + + //Add the box to a Window container + myWindow.Add (myBox); + + // Add some buttons to the container + VBoxTester.AddButton (myBox); + VBoxTester.AddButton (myBox); + VBoxTester.AddButton (myBox); + + myWindow.ShowAll (); + Application.Run (); + } + + static void AddButton (VBox box) + { + box.PackStart (new Button ("Button"), true, false, 0); + } +} + +Imports System +Imports Gtk + +Class VBoxTester + Shared Sub Main () + Application.Init () + Dim myWindow As New Window ("VBox Widget") + + Dim myBox As New VBox (False, 0) + + ' Add the box to a Window container + myWindow.Add (myBox) + myWindow.SetDefaultSize (250, 100) + + ' Add some buttons to the box + VBoxTester.AddButton (myBox) + VBoxTester.AddButton (myBox) + VBoxTester.AddButton (myBox) + + myWindow.ShowAll () + Application.Run () + End Sub + + Shared Sub AddButton (ByVal box As VBox) + box.PackStart (New Button ("Button"), True, False, 0) + End Sub +End Class + + Other ways of laying out widgets include using a horizontal box, (see ), a table, (see ), button boxes, etc. @@ -123,4 +183,4 @@ class VBoxTester { - + \ No newline at end of file