[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Forms.IControlCollection.AddScrollBar

AddScrollBar Method

AddScrollBar(double, double, double, double)

Adds a new IScrollBar.

Creates a scroll bar control on the worksheet at the specified position and size, and returns the newly added control.

Declaration
IScrollBar AddScrollBar(double left, double top, double width, double height)
Function AddScrollBar(left As Double, top As Double, width As Double, height As Double) As IScrollBar
Parameters
Type Name Description
double left

The distance from the left edge of the worksheet to the control.

double top

The distance from the top edge of the worksheet to the control.

double width

The width of the control.

double height

The height of the control.

Returns
Type Description
IScrollBar

The newly added IScrollBar.

Examples
IScrollBar scrollBar = worksheet.Controls.AddScrollBar(20, 20, 120, 18);
scrollBar.Min = 0;
scrollBar.Max = 10;
scrollBar.LinkedCell = worksheet.Range["A1"];