Gets or sets a value that indicates the alignment of the up and down buttons on the box.
The following code example shows how to set the UpDown button's alignment through this property. This example is part of a larger example available for the
DomainUpDownCell class.
void setUpDownAlignButton_Click(object sender, EventArgs e)
{
DomainUpDownCell domainUpDownCell1 = this.gcMultiRow1[0, 0] as DomainUpDownCell;
domainUpDownCell1.ShowSpinButton = CellButtonVisibility.ShowAlways;
if (domainUpDownCell1.UpDownAlign == LeftRightAlignment.Left)
{
domainUpDownCell1.UpDownAlign = LeftRightAlignment.Right;
}
else
{
domainUpDownCell1.UpDownAlign = LeftRightAlignment.Left;
}
label.Text = "Click the button repeatedly, the UpDownAlign property takes effect.";
}
Private Sub setUpDownAlignButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles
setUpDownAlignButton.Click
Dim domainUpDownCell1 As DomainUpDownCell = TryCast(Me.gcMultiRow1(0, 0), DomainUpDownCell)
domainUpDownCell1.ShowSpinButton = CellButtonVisibility.ShowAlways
If domainUpDownCell1.UpDownAlign = LeftRightAlignment.Left Then
domainUpDownCell1.UpDownAlign = LeftRightAlignment.Right
Else
domainUpDownCell1.UpDownAlign = LeftRightAlignment.Left
End If
label.Text = "Click the button repeatedly, the UpDownAlign property takes effect."
End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2