Contributions from cesar2879@yahoo.com
svn path=/trunk/gtk-sharp/; revision=74378
This commit is contained in:
parent
fd01afc12b
commit
e2b1f2b6b1
2 changed files with 92 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
</code></example><example><code lang="Visual Basic .NET">
|
||||
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
|
||||
|
||||
</code></example></summary>
|
||||
<remarks>
|
||||
<para>Other ways of laying out widgets include using a vertical box, (see <see cref="T:Gtk.VBox" />), a table, (see <see cref="T:Gtk.Table" />), button boxes, etc.</para>
|
||||
|
@ -125,4 +153,4 @@ class HBoxTester {
|
|||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
</Type>
|
|
@ -9,7 +9,67 @@
|
|||
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
|
||||
<Docs>
|
||||
<summary>A VBox is a specific type of <see cref="T:Gtk.Container" /> for packing widgets vertically.
|
||||
</summary>
|
||||
<example><code lang="C#">
|
||||
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);
|
||||
}
|
||||
}
|
||||
</code></example><example><code lang="Visual Basic .NET">
|
||||
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
|
||||
|
||||
</code></example></summary>
|
||||
<remarks>
|
||||
<para>Other ways of laying out widgets include using a horizontal box, (see <see cref="T:Gtk.HBox" />), a table, (see <see cref="T:Gtk.Table" />), button boxes, etc.</para>
|
||||
<para>
|
||||
|
@ -123,4 +183,4 @@ class VBoxTester {
|
|||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
</Type>
|
Loading…
Add table
Reference in a new issue