[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Forms.IControlCollection.AddListBox

AddListBox Method

AddListBox(double, double, double, double)

Adds a new IListBox.

Use the returned list box to add selectable items or link the control to a worksheet cell.

Declaration
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
Parameters
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.

Returns
Type Description
IListBox

The added IListBox.

Examples
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;