[]
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.
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
| 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. |
| Type | Description |
|---|---|
| IDropDown | The newly created IDropDown. |
IDropDown dropDown = worksheet.Controls.AddDropDown(20, 20, 120, 24);
dropDown.Items.Add(new DropDownItem("North"));
dropDown.Items.Add(new DropDownItem("South"));
dropDown.SelectedIndex = 0;