GrapeCity MultiRow Windows Forms Documentation
UpDownAlign Property (DomainUpDownCell)
Example 


Gets or sets a value that indicates the alignment of the up and down buttons on the box.
Syntax
<LocalizableAttribute(True)>
<DefaultValueAttribute()>
<SRCategoryAttribute("Appearance")>
<SRDescriptionAttribute("Indicates the alignment of the up and down buttons on the box.")>
Public Property UpDownAlign As LeftRightAlignment
Dim instance As DomainUpDownCell
Dim value As LeftRightAlignment
 
instance.UpDownAlign = value
 
value = instance.UpDownAlign
[Localizable(true)]
[DefaultValue()]
[SRCategory("Appearance")]
[SRDescription("Indicates the alignment of the up and down buttons on the box.")]
public LeftRightAlignment UpDownAlign {get; set;}

Property Value

One of the System.Windows.Forms.LeftRightAlignment values. The default is System.Windows.Forms.LeftRightAlignment.Right.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionThe specified value is not one of the System.Windows.Forms.LeftRightAlignment values.
Example
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
Requirements

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

See Also

Reference

DomainUpDownCell Class
DomainUpDownCell Members

 

 


Copyright © GrapeCity, inc. All rights reserved.