[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Forms.IControlCollection.AddDropDown

AddDropDown Method

AddDropDown(double, double, double, double)

Adds a new IDropDown.

Creates a drop-down form control at the specified position with the specified size on the worksheet. Use the returned control to add items, bind a linked cell, or set the selected item.

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

The left position of the control.

double top

The top position of the control.

double width

The width of the control.

double height

The height of the control.

Returns
Type Description
IDropDown

The newly created IDropDown.

Examples
IDropDown dropDown = worksheet.Controls.AddDropDown(20, 20, 120, 24);
dropDown.Items.Add(new DropDownItem("North"));
dropDown.Items.Add(new DropDownItem("South"));
dropDown.SelectedIndex = 0;