Class SpinButtonActiveXControl

Class SpinButtonActiveXControl

Namespace: Aspose.Cells.Drawing.ActiveXControls
Assembly: Aspose.Cells.dll (25.2.0)

Represents the SpinButton control.

public class SpinButtonActiveXControl : ActiveXControl

Inheritance

objectActiveXControlBaseActiveXControlSpinButtonActiveXControl

Derived

ScrollBarActiveXControl

Inherited Members

ActiveXControl.IsEnabled, ActiveXControl.IsLocked, ActiveXControl.IsTransparent, ActiveXControl.IsAutoSize, ActiveXControl.IMEMode, ActiveXControl.Font, ActiveXControl.TextAlign, ActiveXControl.Data, ActiveXControlBase.Workbook, ActiveXControlBase.Type, ActiveXControlBase.Width, ActiveXControlBase.Height, ActiveXControlBase.MouseIcon, ActiveXControlBase.MousePointer, ActiveXControlBase.ForeOleColor, ActiveXControlBase.BackOleColor, ActiveXControlBase.IsVisible, ActiveXControlBase.Shadow, ActiveXControlBase.LinkedCell, ActiveXControlBase.ListFillRange, ActiveXControlBase.Data, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Examples

csharp
[C#]
//Initialize a new workbook.
Workbook book = new Workbook();

//Add a ToggleButtonActiveXControl.
Shape shape = book.Worksheets[0].Shapes.AddActiveXControl(ControlType.SpinButton, 1, 0, 1, 0, 100, 50);
SpinButtonActiveXControl activeXControl = (SpinButtonActiveXControl)shape.ActiveXControl;

//do your business

//Save the excel file.
book.Save("exmaple.xlsx");

Properties

Max

Gets and sets the maximum acceptable value.

public int Max { get; set; }

Property Value

int

Examples

csharp
[C#]
activeXControl.Max = 100;

Min

Gets and sets the minimum acceptable value.

public int Min { get; set; }

Property Value

int

Examples

csharp
[C#]
activeXControl.Min = 0;

Orientation

Gets and sets whether the SpinButton or ScrollBar is oriented vertically or horizontally.

public ControlScrollOrientation Orientation { get; set; }

Property Value

ControlScrollOrientation

Examples

csharp
[C#]
if(activeXControl.Orientation == Aspose.Cells.Drawing.ActiveXControls.ControlScrollOrientation.Auto)
{
    activeXControl.Orientation = Aspose.Cells.Drawing.ActiveXControls.ControlScrollOrientation.Horizontal;
}

Position

Gets and sets the value.

public int Position { get; set; }

Property Value

int

Examples

csharp
[C#]
activeXControl.Position = 30;

SmallChange

Gets and sets the amount by which the Position property changes

public int SmallChange { get; set; }

Property Value

int

Examples

csharp
[C#]
activeXControl.SmallChange = 5;

Type

Gets the type of the ActiveX control.

public override ControlType Type { get; }

Property Value

ControlType

Examples

csharp
[C#]
if(activeXControl.Type == Aspose.Cells.Drawing.ActiveXControls.ControlType.SpinButton)
{
    //do something
}