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

    Show / Hide Table of Contents

    ExcelFormControl Class

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

    Represents a form control.

    • C#
    • VB.NET
    public abstract class ExcelFormControl : ExcelDrawing
    Public MustInherit Class ExcelFormControl
        Inherits ExcelDrawing
    Inheritance:
    System.Object
    ExcelDrawing
    ExcelFormControl
    Derived
    Button
    CheckBox
    ComboBox
    GroupBox
    Label
    ListBox
    OptionButton
    ScrollBar
    SpinButton

    Properties

    FormControlType

    Gets the FormControlType of the current ExcelFormControl.

    • C#
    • VB.NET
    public abstract FormControlType FormControlType { get; }
    Public MustOverride ReadOnly Property FormControlType As FormControlType
    Property Value
    FormControlType

    The FormControlType of the current ExcelFormControl.

    MacroName

    Gets the name of the assigned vba macro to this button.

    • C#
    • VB.NET
    public string MacroName { get; }
    Public ReadOnly Property MacroName As String
    Property Value
    System.String

    Assigned vba macro to this button.

    Print

    Gets or sets whether current form control is printable.

    • C#
    • VB.NET
    public bool Print { get; set; }
    Public Property Print As Boolean
    Property Value
    System.Boolean

    true if current form control is printable, false otherwise.

    ThreeDShading

    Gets or sets whether 3D effect should be enabled on the current form control.

    • C#
    • VB.NET
    public bool ThreeDShading { get; set; }
    Public Property ThreeDShading As Boolean
    Property Value
    System.Boolean

    true if 3D effect should be enabled on the current form control, false otherwise.

    Methods

    BringForward()

    Moves the form control one position forward in the drawings.

    • C#
    • VB.NET
    public void BringForward()
    Public Sub BringForward
    Remarks

    The index of the form control in the ExcelFormControlCollection will not be updated if the drawing in front is a different type. But it will still update the position.

    BringToFront()

    Brings the form control to the front of the drawings.

    • C#
    • VB.NET
    public void BringToFront()
    Public Sub BringToFront

    MoveZIndex(Int32)

    Moves the form control forward or backward in the drawings with the given relative index.

    • C#
    • VB.NET
    public void MoveZIndex(int relativeIndex)
    Public Sub MoveZIndex(relativeIndex As Integer)
    Parameters
    relativeIndex
    System.Int32

    The relative index for the form control to update. Negative to move backward and positive to move forward.

    SendBackward()

    Moves the form control one position backward in the drawings.

    • C#
    • VB.NET
    public void SendBackward()
    Public Sub SendBackward
    Remarks

    The index of the form control in the ExcelFormControlCollection will not be updated if the item behind is a different type. But it will still update the position.

    SendToBack()

    Sends the form control to the back of the drawings.

    • C#
    • VB.NET
    public void SendToBack()
    Public Sub SendToBack

    SetMacro(VbaModule, String)

    Assigns the given macro to this button.

    • C#
    • VB.NET
    public void SetMacro(VbaModule vbaModule, string methodName)
    Public Sub SetMacro(vbaModule As VbaModule, methodName As String)
    Parameters
    vbaModule
    VbaModule

    The module that contains the method.

    methodName
    System.String

    Name of the method that will be assigned to this button.

    Inherited Properties

    Hyperlink

    Gets or sets the hyperlink on this drawing (picture, chart, etc.).

    (Inherited from ExcelDrawing)

    Metadata

    Gets the metadata (non-visual properties) of this ExcelDrawing instance.

    (Inherited from ExcelDrawing)

    Position

    Gets the position of this drawing (picture, chart, etc.) in the worksheet.

    (Inherited from ExcelDrawing)

    Worksheet

    Gets the parent worksheet.

    (Inherited from ExcelDrawing)

    ZIndex

    Gets the z-order position of the picture. -1 if the picture is not contained in proper collection.

    (Inherited from ExcelDrawing)

    Inherited Methods

    Format()

    Formats this drawing (picture, chart, etc.) to its default size so it can be exported to PDF, XPS, image or be printed.

    (Inherited from ExcelDrawing)

    Format(System.Double, System.Double, LengthUnit)

    Formats this drawing (picture, chart, etc.) to specified size so it can be exported to PDF, XPS, image or be printed.

    (Inherited from ExcelDrawing)

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.