[]
Represents the base interface for form controls.
This interface defines the common members shared by form controls such as buttons, check boxes, drop-down lists, labels, and scroll bars. Use it to access shared control state and behavior, including the parent object, control type, position, size, visibility, printing, and locking settings.
The parent object is typically an IWorksheet, but in some cases it can be
another IControl.
public interface IControl
Public Interface IControl
IControl control = worksheet.Controls.AddButton(20, 20, 120, 30);
FormControlType type = control.FormControlType;
object parent = control.Parent;
control.Enabled = false;
| Name | Description |
|---|---|
| BottomRightCell | Gets the bottom right cell of this control. Returns the worksheet cell at the lower-right corner of the area occupied by the control. |
| Enabled | Gets or sets whether the control is enabled. Not supported by the *.ssjson format. |
| FormControlType | Returns the form control type of this control. |
| Height | Gets or sets the height of this control. |
| Left | Gets or sets the left position of this control. Use this property to retrieve the current horizontal offset of the control. |
| Locked | Gets or sets whether the control is locked. Not supported by the *.ssjson and *.sjs format. |
| Name | Gets or sets the name of this control. |
| Parent | Gets the parent object, typically In some cases, the type of this property is |
| Placement | Gets or sets how a control is attached to its underlying cells. |
| PrintObject | Gets or sets whether the control will be printed. Use this property to determine whether the control is included when the worksheet is printed. |
| ShapeRange | Gets the shapes of this control. |
| Top | Gets or sets the top position of this control. |
| TopLeftCell | Gets the top left cell of this control. The returned IRange identifies the worksheet cell at the upper-left corner of the control. |
| Visible | Gets or sets whether the control is visible. Use this property to determine whether the control is currently displayed on the worksheet. |
| Width | Gets or sets the width of this control. |
| ZOrder | Gets the z-index of this control. Use this property to retrieve the stacking position of the control relative to other controls on the worksheet. The returned value can change after calling BringToFront() or SendToBack(). |
| Name | Description |
|---|---|
| BringToFront() | Changes the z-index of this control to the front. Use this method to place the control in front of other overlapping form controls on the same parent. |
| Delete() | Remove this control from parent. Use this method to remove the current control from its parent object, such as a worksheet or another control container. |
| SendToBack() | Sends the control to the back of the z-order. Use this method to place the control behind other overlapping form controls on the same parent. |