[]
Adds a new IListBox.
Use the returned list box to add selectable items or link the control to a worksheet cell.
IListBox AddListBox(double left, double top, double width, double height)
Function AddListBox(left As Double, top As Double, width As Double, height As Double) As IListBox
| Type | Name | Description |
|---|---|---|
| double | left | The left position of the list box. |
| double | top | The top position of the list box. |
| double | width | The width of the list box. |
| double | height | The height of the list box. |
| Type | Description |
|---|---|
| IListBox | The added IListBox. |
IListBox listBox = worksheet.Controls.AddListBox(24.1, 273.1, 170, 78.69);
listBox.Items.Add(new ListBoxItem("North"));
listBox.Items.Add(new ListBoxItem("South"));
listBox.SelectedIndex = 0;