Back to Devexpress

FormControlCollection.AddSpinner(CellRange) Method

officefileapi-devexpress-dot-spreadsheet-dot-formcontrolcollection-dot-addspinner-x28-devexpress-dot-spreadsheet-dot-cellrange-x29.md

latest2.4 KB
Original Source

FormControlCollection.AddSpinner(CellRange) Method

Adds a spinner form control at a specified cell range.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
SpinnerFormControl AddSpinner(
    CellRange targetRange
)
vb
Function AddSpinner(
    targetRange As CellRange
) As SpinnerFormControl

Parameters

NameTypeDescription
targetRangeCellRange

A cell range where the form control should be located.

|

Returns

TypeDescription
SpinnerFormControl

The spinner form control.

|

Remarks

Example

The code sample below creates a spinner form control:

csharp
Workbook workbook = new Workbook();
workbook.LoadDocument("Document.xlsx");

var formControls = workbook.Worksheets[0].FormControls;

var cellRange = workbook.Worksheets[0].Cells["B2:B8"];
var spinner = formControls.AddSpinner(cellRange);
spinner.SmallChange = 5;
spinner.Min = 1;
spinner.Max = 100;
vb
Dim workbook As New Workbook()
workbook.LoadDocument("Document.xlsx")

Dim formControls = workbook.Worksheets(0).FormControls

Dim cellRange = workbook.Worksheets(0).Range("B2:B8")
Dim spinner = formControls.AddSpinner(cellRange)
spinner.SmallChange = 5
spinner.Min = 1
spinner.Max = 100

Note

The FormControlCollection.AddSpinner method call adds a new item to both FormControlCollection and ShapeCollection.

See Also

FormControlCollection Interface

FormControlCollection Members

DevExpress.Spreadsheet Namespace