* en/Gtk/HBox.xml: * en/Gtk/VBox.xml: move example tag outside summary. svn path=/trunk/gtk-sharp/; revision=98514
187 lines
5.8 KiB
XML
187 lines
5.8 KiB
XML
<Type Name="VBox" FullName="Gtk.VBox">
|
|
<TypeSignature Language="C#" Maintainer="Lee Mallabone" Value="public class VBox : Gtk.Box" />
|
|
<AssemblyInfo>
|
|
<AssemblyName>gtk-sharp</AssemblyName>
|
|
<AssemblyPublicKey>
|
|
</AssemblyPublicKey>
|
|
<AssemblyVersion>2.12.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<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>
|
|
<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>
|
|
Useful methods for manipulating boxes can be found in the superclass for HBox, <see cref="T:Gtk.Box" />.
|
|
</para>
|
|
<para>Here is a simple example of the class' usage:</para>
|
|
<example>
|
|
<code lang="C#">
|
|
using System;
|
|
using Gtk;
|
|
|
|
class VBoxTester {
|
|
|
|
static void Main ()
|
|
{
|
|
Application.Init ();
|
|
Window myWindow = new Window ("VBox Widget");
|
|
|
|
VBox myBox = new VBox (false, 4);
|
|
|
|
//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);
|
|
}
|
|
}
|
|
</code>
|
|
</example>
|
|
</remarks>
|
|
</Docs>
|
|
<Base>
|
|
<BaseTypeName>Gtk.Box</BaseTypeName>
|
|
</Base>
|
|
<Interfaces>
|
|
</Interfaces>
|
|
<Members>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public VBox (IntPtr raw);" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="raw" Type="System.IntPtr" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Internal constructor</summary>
|
|
<param name="raw">Pointer to the C object.</param>
|
|
<remarks>
|
|
<para>This is an internal constructor, and should not be used by user code.</para>
|
|
</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public VBox (bool homogeneous, int spacing);" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="homogeneous" Type="System.Boolean" />
|
|
<Parameter Name="spacing" Type="System.Int32" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>The main way to create a new VBox</summary>
|
|
<param name="homogeneous">If <see langword="true" />, all widgets in the box are forced to be equally sized.</param>
|
|
<param name="spacing">The number of pixels to place between each widget in the box.</param>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="GType">
|
|
<MemberSignature Language="C#" Value="public static GLib.GType GType { get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>GLib.GType</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>GType property.</summary>
|
|
<value>a <see cref="T:GLib.GType" /></value>
|
|
<remarks>Returns the native GObject type for <see cref="T:Gtk.VBox" />.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="protected VBox (GLib.GType gtype);" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="gtype" Type="GLib.GType" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Protected constructor.</summary>
|
|
<param name="gtype">a <see cref="T:GLib.GType" /></param>
|
|
<remarks>Chain to this constructor from subclasses when you manually register a <see cref="T:GLib.GType" /> for your subclass.</remarks>
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.Obsolete</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public VBox ();" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>VBox Constructor.</summary>
|
|
<remarks>Instantiates a <see cref="T:Gtk.VBox" /> object using default values for the spacing and homogeneous attributes.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
</Members>
|
|
</Type>
|