[]
Gets the index of a control.
Returns the zero-based position of the specified control in this collection.
int IndexOf(IControl control)
Function IndexOf(control As IControl) As Integer
| Type | Name | Description |
|---|---|---|
| IControl | control | The control to find. If |
| Type | Description |
|---|---|
| int | If found, returns the index of the control. Otherwise, returns |
IControlCollection controls = worksheet.Controls;
IButton button = controls.AddButton(20, 20, 100, 24);
int index = controls.IndexOf(button);