GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    ExcelFormControlCollection Class

    Namespace:
    GemBox.Spreadsheet.Drawing
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a collection of ExcelFormControls in the worksheet or group.

    • C#
    • VB.NET
    public class ExcelFormControlCollection : ExcelDrawingCollection<ExcelFormControl>, IList<ExcelFormControl>, ICollection<ExcelFormControl>, IEnumerable<ExcelFormControl>, IEnumerable
    Public Class ExcelFormControlCollection
        Inherits ExcelDrawingCollection(Of ExcelFormControl)
        Implements IList(Of ExcelFormControl), ICollection(Of ExcelFormControl), IEnumerable(Of ExcelFormControl), IEnumerable
    Inheritance:
    System.Object
    ExcelDrawingCollection<ExcelFormControl>
    ExcelFormControlCollection
    Implements
    System.Collections.Generic.IList<ExcelFormControl>
    System.Collections.Generic.ICollection<ExcelFormControl>
    System.Collections.Generic.IEnumerable<ExcelFormControl>
    System.Collections.IEnumerable

    Methods

    AddButton(String, AnchorCell, AnchorCell)

    Adds a new button to the collection which moves and sizes with cells.

    • C#
    • VB.NET
    public Button AddButton(string text, AnchorCell positionFrom, AnchorCell positionTo)
    Public Function AddButton(text As String, positionFrom As AnchorCell, positionTo As AnchorCell) As Button
    Parameters
    text
    System.String

    The text displayed on the button.

    positionFrom
    AnchorCell

    The button's position (top-left corner).

    positionTo
    AnchorCell

    The button's end position (bottom-right corner).

    Returns
    Button

    A new button added to the collection which moves and sizes with cells.

    AddButton(String, AnchorCell, Double, Double, LengthUnit)

    Adds a new button to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public Button AddButton(string text, AnchorCell positionFrom, double width, double height, LengthUnit unit)
    Public Function AddButton(text As String, positionFrom As AnchorCell, width As Double, height As Double, unit As LengthUnit) As Button
    Parameters
    text
    System.String

    The text displayed on the button.

    positionFrom
    AnchorCell

    The button's position.

    width
    System.Double

    The button's width.

    height
    System.Double

    The button's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    Button

    A new button added to the collection which moves but doesn't size with cells.

    AddButton(String, Double, Double, Double, Double, LengthUnit)

    Adds a new button to the collection which doesn't move nor sizes with cells.

    • C#
    • VB.NET
    public Button AddButton(string text, double left, double top, double width, double height, LengthUnit unit)
    Public Function AddButton(text As String, left As Double, top As Double, width As Double, height As Double, unit As LengthUnit) As Button
    Parameters
    text
    System.String

    The text displayed on the button.

    left
    System.Double

    The distance of the left edge of the button from the left edge of the worksheet or group.

    top
    System.Double

    The distance of the top edge of the button from the top edge of the worksheet or group.

    width
    System.Double

    The button's width.

    height
    System.Double

    The button's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    Button

    A new button added to the collection which doesn't move nor sizes with cells.

    AddButton(String, String, Double, Double, LengthUnit)

    Adds a new button to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public Button AddButton(string text, string positionFromCell, double width, double height, LengthUnit unit)
    Public Function AddButton(text As String, positionFromCell As String, width As Double, height As Double, unit As LengthUnit) As Button
    Parameters
    text
    System.String

    The text displayed on the button.

    positionFromCell
    System.String

    The button's position (for example, "A1").

    width
    System.Double

    The button's width.

    height
    System.Double

    The button's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    Button

    A new button added to the collection which moves but doesn't size with cells.

    AddButton(String, String, String)

    Adds a new button to the collection which moves and sizes with cells.

    • C#
    • VB.NET
    public Button AddButton(string text, string positionFromCell, string positionToCell)
    Public Function AddButton(text As String, positionFromCell As String, positionToCell As String) As Button
    Parameters
    text
    System.String

    The text displayed on the button.

    positionFromCell
    System.String

    The button's position (top-left corner) (for example, "A1").

    positionToCell
    System.String

    The button's end position (bottom-right corner) (for example, "B2").

    Returns
    Button

    A new button added to the collection which moves and sizes with cells.

    AddCheckBox(String, AnchorCell, Double, Double, LengthUnit)

    Adds a new checkbox to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public CheckBox AddCheckBox(string text, AnchorCell positionFrom, double width, double height, LengthUnit unit)
    Public Function AddCheckBox(text As String, positionFrom As AnchorCell, width As Double, height As Double, unit As LengthUnit) As CheckBox
    Parameters
    text
    System.String

    The text displayed next to the checkbox.

    positionFrom
    AnchorCell

    The position of the checkbox.

    width
    System.Double

    The width of the checkbox.

    height
    System.Double

    The height of the checkbox.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    CheckBox

    A new checkbox added to the collection which moves but doesn't size with cells.

    AddCheckBox(String, Double, Double, Double, Double, LengthUnit)

    Adds a new checkbox to the collection which doesn't move nor sizes with cells.

    • C#
    • VB.NET
    public CheckBox AddCheckBox(string text, double left, double top, double width, double height, LengthUnit unit)
    Public Function AddCheckBox(text As String, left As Double, top As Double, width As Double, height As Double, unit As LengthUnit) As CheckBox
    Parameters
    text
    System.String

    The text displayed next to the checkbox.

    left
    System.Double

    The distance of the left edge of the checkbox from the left edge of the worksheet or group.

    top
    System.Double

    The distance of the top edge of the checkbox from the top edge of the worksheet or group.

    width
    System.Double

    The width of the checkbox.

    height
    System.Double

    The height of the checkbox.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    CheckBox

    A new checkbox added to the collection which doesn't move nor sizes with cells.

    AddCheckBox(String, String, Double, Double, LengthUnit)

    Adds a new checkbox to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public CheckBox AddCheckBox(string text, string positionFromCell, double width, double height, LengthUnit unit)
    Public Function AddCheckBox(text As String, positionFromCell As String, width As Double, height As Double, unit As LengthUnit) As CheckBox
    Parameters
    text
    System.String

    The text displayed next to the checkbox.

    positionFromCell
    System.String

    The position of the checkbox (for example, "A1").

    width
    System.Double

    The width of the checkbox.

    height
    System.Double

    The height of the checkbox.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    CheckBox

    A new checkbox added to the collection which moves but doesn't size with cells.

    AddComboBox(AnchorCell, Double, Double, LengthUnit)

    Adds a new combo box to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public ComboBox AddComboBox(AnchorCell positionFrom, double width, double height, LengthUnit unit)
    Public Function AddComboBox(positionFrom As AnchorCell, width As Double, height As Double, unit As LengthUnit) As ComboBox
    Parameters
    positionFrom
    AnchorCell

    The combo box's position.

    width
    System.Double

    The combo box's width.

    height
    System.Double

    The combo box's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    ComboBox

    A new combo box added to the collection which moves but doesn't size with cells.

    AddComboBox(Double, Double, Double, Double, LengthUnit)

    Adds a new combo box to the collection which doesn't move nor sizes with cells.

    • C#
    • VB.NET
    public ComboBox AddComboBox(double left, double top, double width, double height, LengthUnit unit)
    Public Function AddComboBox(left As Double, top As Double, width As Double, height As Double, unit As LengthUnit) As ComboBox
    Parameters
    left
    System.Double

    The distance of the left edge of the combo box from the left edge of the worksheet or group.

    top
    System.Double

    The distance of the top edge of the combo box from the top edge of the worksheet or group.

    width
    System.Double

    The combo box's width.

    height
    System.Double

    The combo box's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    ComboBox

    A new combo box added to the collection which doesn't move nor sizes with cells.

    AddComboBox(String, Double, Double, LengthUnit)

    Adds a new combo box to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public ComboBox AddComboBox(string positionFromCell, double width, double height, LengthUnit unit)
    Public Function AddComboBox(positionFromCell As String, width As Double, height As Double, unit As LengthUnit) As ComboBox
    Parameters
    positionFromCell
    System.String

    The combo box's position (for example, "A1").

    width
    System.Double

    The combo box's width.

    height
    System.Double

    The combo box's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    ComboBox

    A new combo box added to the collection which moves but doesn't size with cells.

    AddGroupBox(String, AnchorCell, Double, Double, LengthUnit)

    Adds a new group box to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public GroupBox AddGroupBox(string text, AnchorCell positionFrom, double width, double height, LengthUnit unit)
    Public Function AddGroupBox(text As String, positionFrom As AnchorCell, width As Double, height As Double, unit As LengthUnit) As GroupBox
    Parameters
    text
    System.String

    The text displayed on the group box.

    positionFrom
    AnchorCell

    The group box's position.

    width
    System.Double

    The group box's width.

    height
    System.Double

    The group box's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    GroupBox

    A new group box added to the collection which moves but doesn't size with cells.

    AddGroupBox(String, Double, Double, Double, Double, LengthUnit)

    Adds a new group box to the collection which doesn't move nor sizes with cells.

    • C#
    • VB.NET
    public GroupBox AddGroupBox(string text, double left, double top, double width, double height, LengthUnit unit)
    Public Function AddGroupBox(text As String, left As Double, top As Double, width As Double, height As Double, unit As LengthUnit) As GroupBox
    Parameters
    text
    System.String

    The text displayed on the group box.

    left
    System.Double

    The distance of the left edge of the group box from the left edge of the worksheet or group.

    top
    System.Double

    The distance of the top edge of the group box from the top edge of the worksheet or group.

    width
    System.Double

    The group box's width.

    height
    System.Double

    The group box's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    GroupBox

    A new group box added to the collection which doesn't move nor sizes with cells.

    AddGroupBox(String, String, Double, Double, LengthUnit)

    Adds a new group box to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public GroupBox AddGroupBox(string text, string positionFromCell, double width, double height, LengthUnit unit)
    Public Function AddGroupBox(text As String, positionFromCell As String, width As Double, height As Double, unit As LengthUnit) As GroupBox
    Parameters
    text
    System.String

    The text displayed on the group box.

    positionFromCell
    System.String

    The group box's position (for example, "A1").

    width
    System.Double

    The group box's width.

    height
    System.Double

    The group box's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    GroupBox

    A new group box added to the collection which moves but doesn't size with cells.

    AddLabel(String, AnchorCell, AnchorCell)

    Adds a new label to the collection which moves and sizes with cells.

    • C#
    • VB.NET
    public Label AddLabel(string text, AnchorCell positionFrom, AnchorCell positionTo)
    Public Function AddLabel(text As String, positionFrom As AnchorCell, positionTo As AnchorCell) As Label
    Parameters
    text
    System.String

    The text displayed on the label.

    positionFrom
    AnchorCell

    The label's position (top-left corner).

    positionTo
    AnchorCell

    The label's end position (bottom-right corner).

    Returns
    Label

    A new label added to the collection which moves and sizes with cells.

    AddLabel(String, AnchorCell, Double, Double, LengthUnit)

    Adds a new label to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public Label AddLabel(string text, AnchorCell positionFrom, double width, double height, LengthUnit unit)
    Public Function AddLabel(text As String, positionFrom As AnchorCell, width As Double, height As Double, unit As LengthUnit) As Label
    Parameters
    text
    System.String

    The text displayed on the label.

    positionFrom
    AnchorCell

    The label's position.

    width
    System.Double

    The label's width.

    height
    System.Double

    The label's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    Label

    A new label added to the collection which moves but doesn't size with cells.

    AddLabel(String, Double, Double, Double, Double, LengthUnit)

    Adds a new label to the collection which doesn't move nor sizes with cells.

    • C#
    • VB.NET
    public Label AddLabel(string text, double left, double top, double width, double height, LengthUnit unit)
    Public Function AddLabel(text As String, left As Double, top As Double, width As Double, height As Double, unit As LengthUnit) As Label
    Parameters
    text
    System.String

    The text displayed on the label.

    left
    System.Double

    The distance of the left edge of the label from the left edge of the worksheet or group.

    top
    System.Double

    The distance of the top edge of the label from the top edge of the worksheet or group.

    width
    System.Double

    The label's width.

    height
    System.Double

    The label's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    Label

    A new label added to the collection which doesn't move nor sizes with cells.

    AddLabel(String, String, Double, Double, LengthUnit)

    Adds a new label to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public Label AddLabel(string text, string positionFromCell, double width, double height, LengthUnit unit)
    Public Function AddLabel(text As String, positionFromCell As String, width As Double, height As Double, unit As LengthUnit) As Label
    Parameters
    text
    System.String

    The text displayed on the label.

    positionFromCell
    System.String

    The label's position (for example, "A1").

    width
    System.Double

    The label's width.

    height
    System.Double

    The label's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    Label

    A new label added to the collection which moves but doesn't size with cells.

    AddLabel(String, String, String)

    Adds a new label to the collection which moves and sizes with cells.

    • C#
    • VB.NET
    public Label AddLabel(string text, string positionFromCell, string positionToCell)
    Public Function AddLabel(text As String, positionFromCell As String, positionToCell As String) As Label
    Parameters
    text
    System.String

    The text displayed on the label.

    positionFromCell
    System.String

    The label's position (top-left corner) (for example, "A1").

    positionToCell
    System.String

    The label's end position (bottom-right corner) (for example, "B2").

    Returns
    Label

    A new label added to the collection which moves and sizes with cells.

    AddOptionButton(String, AnchorCell, Double, Double, LengthUnit)

    Adds a new option (radio) button to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public OptionButton AddOptionButton(string text, AnchorCell positionFrom, double width, double height, LengthUnit unit)
    Public Function AddOptionButton(text As String, positionFrom As AnchorCell, width As Double, height As Double, unit As LengthUnit) As OptionButton
    Parameters
    text
    System.String

    The text displayed next to the option button.

    positionFrom
    AnchorCell

    The option button's position.

    width
    System.Double

    The option button's width.

    height
    System.Double

    The option button's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    OptionButton

    A new option button added to the collection which moves but doesn't size with cells.

    AddOptionButton(String, Double, Double, Double, Double, LengthUnit)

    Adds a new option (radio) button to the collection which doesn't move nor sizes with cells.

    • C#
    • VB.NET
    public OptionButton AddOptionButton(string text, double left, double top, double width, double height, LengthUnit unit)
    Public Function AddOptionButton(text As String, left As Double, top As Double, width As Double, height As Double, unit As LengthUnit) As OptionButton
    Parameters
    text
    System.String

    The text displayed next to the option button.

    left
    System.Double

    The distance of the left edge of the option button from the left edge of the worksheet or group.

    top
    System.Double

    The distance of the top edge of the option button from the top edge of the worksheet or group.

    width
    System.Double

    The option button's width.

    height
    System.Double

    The option button's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    OptionButton

    A new option button added to the collection which doesn't move nor sizes with cells.

    AddOptionButton(String, String, Double, Double, LengthUnit)

    Adds a new option (radio) button to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public OptionButton AddOptionButton(string text, string positionFromCell, double width, double height, LengthUnit unit)
    Public Function AddOptionButton(text As String, positionFromCell As String, width As Double, height As Double, unit As LengthUnit) As OptionButton
    Parameters
    text
    System.String

    The text displayed next to the option button.

    positionFromCell
    System.String

    The option button's position (for example, "A1").

    width
    System.Double

    The option button's width.

    height
    System.Double

    The option button's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    OptionButton

    A new option button added to the collection which moves but doesn't size with cells.

    AddScrollBar(AnchorCell, Double, Double, LengthUnit)

    Adds a new scroll bar to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public ScrollBar AddScrollBar(AnchorCell positionFrom, double width, double height, LengthUnit unit)
    Public Function AddScrollBar(positionFrom As AnchorCell, width As Double, height As Double, unit As LengthUnit) As ScrollBar
    Parameters
    positionFrom
    AnchorCell

    The scroll bar's position.

    width
    System.Double

    The scroll bar's width.

    height
    System.Double

    The scroll bar's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    ScrollBar

    A new scroll bar added to the collection which moves but doesn't size with cells.

    AddScrollBar(Double, Double, Double, Double, LengthUnit)

    Adds a new scroll bar to the collection which doesn't move nor sizes with cells.

    • C#
    • VB.NET
    public ScrollBar AddScrollBar(double left, double top, double width, double height, LengthUnit unit)
    Public Function AddScrollBar(left As Double, top As Double, width As Double, height As Double, unit As LengthUnit) As ScrollBar
    Parameters
    left
    System.Double

    The distance of the left edge of the scroll bar from the left edge of the worksheet or group.

    top
    System.Double

    The distance of the top edge of the scroll bar from the top edge of the worksheet or group.

    width
    System.Double

    The scroll bar's width.

    height
    System.Double

    The scroll bar's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    ScrollBar

    A new scroll bar added to the collection which doesn't move nor sizes with cells.

    AddScrollBar(String, Double, Double, LengthUnit)

    Adds a new scroll bar to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public ScrollBar AddScrollBar(string positionFromCell, double width, double height, LengthUnit unit)
    Public Function AddScrollBar(positionFromCell As String, width As Double, height As Double, unit As LengthUnit) As ScrollBar
    Parameters
    positionFromCell
    System.String

    The scroll bar's position (for example, "A1").

    width
    System.Double

    The scroll bar's width.

    height
    System.Double

    The scroll bar's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    ScrollBar

    A new scroll bar added to the collection which moves but doesn't size with cells.

    AddSpinButton(AnchorCell, AnchorCell)

    Adds a new spin button to the collection which moves and sizes with cells.

    • C#
    • VB.NET
    public SpinButton AddSpinButton(AnchorCell positionFrom, AnchorCell positionTo)
    Public Function AddSpinButton(positionFrom As AnchorCell, positionTo As AnchorCell) As SpinButton
    Parameters
    positionFrom
    AnchorCell

    The spin button's position (top-left corner).

    positionTo
    AnchorCell

    The spin button's end position (bottom-right corner).

    Returns
    SpinButton

    A new spin button added to the collection which moves and sizes with cells.

    AddSpinButton(AnchorCell, Double, Double, LengthUnit)

    Adds a new spin button to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public SpinButton AddSpinButton(AnchorCell positionFrom, double width, double height, LengthUnit unit)
    Public Function AddSpinButton(positionFrom As AnchorCell, width As Double, height As Double, unit As LengthUnit) As SpinButton
    Parameters
    positionFrom
    AnchorCell

    The spin button's position.

    width
    System.Double

    The spin button's width.

    height
    System.Double

    The spin button's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    SpinButton

    A new spin button added to the collection which moves but doesn't size with cells.

    AddSpinButton(Double, Double, Double, Double, LengthUnit)

    Adds a new spin button to the collection which doesn't move nor sizes with cells.

    • C#
    • VB.NET
    public SpinButton AddSpinButton(double left, double top, double width, double height, LengthUnit unit)
    Public Function AddSpinButton(left As Double, top As Double, width As Double, height As Double, unit As LengthUnit) As SpinButton
    Parameters
    left
    System.Double

    The distance of the left edge of the spin button from the left edge of the worksheet or group.

    top
    System.Double

    The distance of the top edge of the spin button from the top edge of the worksheet or group.

    width
    System.Double

    The spin button's width.

    height
    System.Double

    The spin button's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    SpinButton

    A new spin button added to the collection which doesn't move nor sizes with cells.

    AddSpinButton(String, Double, Double, LengthUnit)

    Adds a new spin button to the collection which moves but doesn't size with cells.

    • C#
    • VB.NET
    public SpinButton AddSpinButton(string positionFromCell, double width, double height, LengthUnit unit)
    Public Function AddSpinButton(positionFromCell As String, width As Double, height As Double, unit As LengthUnit) As SpinButton
    Parameters
    positionFromCell
    System.String

    The spin button's position (for example, "A1").

    width
    System.Double

    The spin button's width.

    height
    System.Double

    The spin button's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    Returns
    SpinButton

    A new spin button added to the collection which moves but doesn't size with cells.

    AddSpinButton(String, String)

    Adds a new spin button to the collection which moves and sizes with cells.

    • C#
    • VB.NET
    public SpinButton AddSpinButton(string positionFromCell, string positionToCell)
    Public Function AddSpinButton(positionFromCell As String, positionToCell As String) As SpinButton
    Parameters
    positionFromCell
    System.String

    The spin button's position (top-left corner) (for example, "A1").

    positionToCell
    System.String

    The spin button's end position (bottom-right corner) (for example, "B2").

    Returns
    SpinButton

    A new spin button added to the collection which moves and sizes with cells.

    Implements

    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    See Also

    FormControls
    FormControls
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.