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

    Show / Hide Table of Contents

    ListBox Class

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

    Represents a List Box Form Control.

    • C#
    • VB.NET
    public class ListBox : ExcelFormControl
    Public Class ListBox
        Inherits ExcelFormControl
    Inheritance:
    System.Object
    ExcelDrawing
    ExcelFormControl
    ListBox

    Properties

    CellLink

    Gets or sets the cell which holds the value of this list box.

    • C#
    • VB.NET
    public ExcelCell CellLink { get; set; }
    Public Property CellLink As ExcelCell
    Property Value
    ExcelCell

    The cell which holds the value of this list box.

    FormControlType

    Gets the ListBox value.

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

    The ListBox value.

    Overrides
    ExcelFormControl.FormControlType

    InputRange

    Gets or sets a CellRange which is used as the input range for this list box.

    • C#
    • VB.NET
    public CellRange InputRange { get; set; }
    Public Property InputRange As CellRange
    Property Value
    CellRange

    The CellRange which is used as the input range for this list box.

    SelectedIndexes

    Gets or sets the indexes of the selected items in the listbox.

    • C#
    • VB.NET
    public int[] SelectedIndexes { get; set; }
    Public Property SelectedIndexes As Integer()
    Property Value
    System.Int32[]

    The index of the selected items in the listbox.

    Remarks

    Similarly to MS Excel, the indexes are 1-based.

    Exceptions
    System.ArgumentException

    If SelectionType is Single and this property is being set with multiple indexes.

    SelectedValues

    Gets the selected values in the listbox.

    • C#
    • VB.NET
    public object[] SelectedValues { get; }
    Public ReadOnly Property SelectedValues As Object()
    Property Value
    System.Object[]

    Selected values in the listbox.

    SelectionType

    Gets or sets the selection type of this list box.

    • C#
    • VB.NET
    public FormControlSelectionType SelectionType { get; set; }
    Public Property SelectionType As FormControlSelectionType
    Property Value
    FormControlSelectionType

    The selection type of this list box.

    Inherited Properties

    Hyperlink

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

    (Inherited from ExcelDrawing)

    MacroName

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

    (Inherited from ExcelFormControl)

    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)

    Print

    Gets or sets whether current form control is printable.

    (Inherited from ExcelFormControl)

    ThreeDShading

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

    (Inherited from ExcelFormControl)

    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

    BringForward()

    Moves the form control one position forward in the drawings.

    (Inherited from ExcelFormControl)

    BringToFront()

    Brings the form control to the front of the drawings.

    (Inherited from ExcelFormControl)

    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)

    MoveZIndex(System.Int32)

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

    (Inherited from ExcelFormControl)

    SendBackward()

    Moves the form control one position backward in the drawings.

    (Inherited from ExcelFormControl)

    SendToBack()

    Sends the form control to the back of the drawings.

    (Inherited from ExcelFormControl)

    SetMacro(VbaModule, System.String)

    Assigns the given macro to this button.

    (Inherited from ExcelFormControl)

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.