## ListBoxActiveXControl class

Represents a ListBox ActiveX control.

```csharp
public class ListBoxActiveXControl : ActiveXControl
```

## Properties

| Name | Description |
| --- | --- |
| virtual [BackOleColor](../../aspose.cells.drawing.activexcontrols/activexcontrolbase/backolecolor/) { get; set; } | Gets and sets the ole color of the background.(Inherited from [`ActiveXControlBase`](../activexcontrolbase/).) |
| [BorderOleColor](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/borderolecolor/) { get; set; } | Gets and sets the ole color of the background. |
| [BorderStyle](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/borderstyle/) { get; set; } | Gets and set the type of border used by the control. |
| [BoundColumn](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/boundcolumn/) { get; set; } | Represents how the Value property is determined for a ComboBox or ListBox when the MultiSelect properties value (fmMultiSelectSingle). |
| [ColumnCount](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/columncount/) { get; set; } | Represents the number of columns to display in a ComboBox or ListBox. |
| [ColumnWidths](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/columnwidths/) { get; set; } | Gets and sets the width of the column. |
| override [Data](../../aspose.cells.drawing.activexcontrols/activexcontrol/data/) { get; } | Gets and sets the binary data of the control.(Inherited from [`ActiveXControl`](../activexcontrol/).) |
| [Font](../../aspose.cells.drawing.activexcontrols/activexcontrol/font/) { get; } | Represents the font of the control.(Inherited from [`ActiveXControl`](../activexcontrol/).) |
| virtual [ForeOleColor](../../aspose.cells.drawing.activexcontrols/activexcontrolbase/foreolecolor/) { get; set; } | Gets and sets the ole color of the foreground.(Inherited from [`ActiveXControlBase`](../activexcontrolbase/).) |
| virtual [Height](../../aspose.cells.drawing.activexcontrols/activexcontrolbase/height/) { get; set; } | Gets and sets the height of the control in unit of points.(Inherited from [`ActiveXControlBase`](../activexcontrolbase/).) |
| [IMEMode](../../aspose.cells.drawing.activexcontrols/activexcontrol/imemode/) { get; set; } | Gets and sets the default run-time mode of the Input Method Editor for the control as it receives focus.(Inherited from [`ActiveXControl`](../activexcontrol/).) |
| [IntegralHeight](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/integralheight/) { get; set; } | Indicates whether the control will only show complete lines of text without showing any partial lines. |
| virtual [IsAutoSize](../../aspose.cells.drawing.activexcontrols/activexcontrol/isautosize/) { get; set; } | Indicates whether the control will automatically resize to display its entire contents.(Inherited from [`ActiveXControl`](../activexcontrol/).) |
| [IsEnabled](../../aspose.cells.drawing.activexcontrols/activexcontrol/isenabled/) { get; set; } | Indicates whether the control can receive the focus and respond to user-generated events.(Inherited from [`ActiveXControl`](../activexcontrol/).) |
| [IsLocked](../../aspose.cells.drawing.activexcontrols/activexcontrol/islocked/) { get; set; } | Indicates whether data in the control is locked for editing.(Inherited from [`ActiveXControl`](../activexcontrol/).) |
| [IsTransparent](../../aspose.cells.drawing.activexcontrols/activexcontrol/istransparent/) { get; set; } | Indicates whether the control is transparent.(Inherited from [`ActiveXControl`](../activexcontrol/).) |
| virtual [IsVisible](../../aspose.cells.drawing.activexcontrols/activexcontrolbase/isvisible/) { get; set; } | Indicates whether this control is visible.(Inherited from [`ActiveXControlBase`](../activexcontrolbase/).) |
| [LinkedCell](../../aspose.cells.drawing.activexcontrols/activexcontrolbase/linkedcell/) { get; set; } | Gets and sets the linked cell.(Inherited from [`ActiveXControlBase`](../activexcontrolbase/).) |
| [ListFillRange](../../aspose.cells.drawing.activexcontrols/activexcontrolbase/listfillrange/) { get; set; } | Gets and sets the list fill range.(Inherited from [`ActiveXControlBase`](../activexcontrolbase/).) |
| [ListStyle](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/liststyle/) { get; set; } | Gets and sets the visual appearance. |
| [ListWidth](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/listwidth/) { get; set; } | Gets and set the width in unit of points. |
| [MatchEntry](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/matchentry/) { get; set; } | Indicates how a ListBox or ComboBox searches its list as the user types. |
| [MouseIcon](../../aspose.cells.drawing.activexcontrols/activexcontrolbase/mouseicon/) { get; set; } | Gets and sets a custom icon to display as the mouse pointer for the control.(Inherited from [`ActiveXControlBase`](../activexcontrolbase/).) |
| [MousePointer](../../aspose.cells.drawing.activexcontrols/activexcontrolbase/mousepointer/) { get; set; } | Gets and sets the type of icon displayed as the mouse pointer for the control.(Inherited from [`ActiveXControlBase`](../activexcontrolbase/).) |
| [ScrollBars](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/scrollbars/) { get; set; } | Indicates specifies whether the control has vertical scroll bars, horizontal scroll bars, both, or neither. |
| [SelectionType](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/selectiontype/) { get; set; } | Indicates whether the control permits multiple selections. |
| virtual [Shadow](../../aspose.cells.drawing.activexcontrols/activexcontrolbase/shadow/) { get; set; } | Indicates whether to show a shadow.(Inherited from [`ActiveXControlBase`](../activexcontrolbase/).) |
| [ShowColumnHeads](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/showcolumnheads/) { get; set; } | Indicates whether column headings are displayed. |
| [SpecialEffect](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/specialeffect/) { get; set; } | Gets and sets the special effect of the control. |
| [TextAlign](../../aspose.cells.drawing.activexcontrols/activexcontrol/textalign/) { get; set; } | Represents how to align the text used by the control.(Inherited from [`ActiveXControl`](../activexcontrol/).) |
| [TextColumn](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/textcolumn/) { get; set; } | Represents the column in a ComboBox or ListBox to display to the user. |
| override [Type](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/type/) { get; } | Gets the type of the ActiveX control. |
| [Value](../../aspose.cells.drawing.activexcontrols/listboxactivexcontrol/value/) { get; set; } | Gets and sets the value of the control. |
| virtual [Width](../../aspose.cells.drawing.activexcontrols/activexcontrolbase/width/) { get; set; } | Gets and sets the width of the control in unit of points.(Inherited from [`ActiveXControlBase`](../activexcontrolbase/).) |
| [Workbook](../../aspose.cells.drawing.activexcontrols/activexcontrolbase/workbook/) { get; } | Gets the [`Workbook`](../activexcontrolbase/workbook/) object.(Inherited from [`ActiveXControlBase`](../activexcontrolbase/).) |

### Examples

```csharp
using Aspose.Cells;
using Aspose.Cells.Drawing;
using Aspose.Cells.Drawing.ActiveXControls;
using System;

namespace AsposeCellsExamples
{
    public class ListBoxActiveXControlDemo
    {
        public static void RunDemo()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();

            // Add a new worksheet to the workbook
            Worksheet worksheet = workbook.Worksheets[0];

            // Add a ListBox ActiveX control to the worksheet
            var shape = worksheet.Shapes.AddActiveXControl(ControlType.ListBox, 5, 0, 1, 1, 100, 100);
            ListBoxActiveXControl listBox = (ListBoxActiveXControl)shape.ActiveXControl;

            // Set properties for the ListBox
            listBox.ListWidth = 100;
            listBox.BoundColumn = 1;
            listBox.TextColumn = 1;
            listBox.ColumnCount = 2;
            listBox.MatchEntry = ControlMatchEntryType.Complete;
            listBox.ListStyle = ControlListStyle.Plain;
            listBox.SelectionType = SelectionType.Multi;
            listBox.Value = "Item1";
            listBox.BorderOleColor = 0x000000; // Black color
            listBox.SpecialEffect = ControlSpecialEffectType.Flat;
            listBox.ShowColumnHeads = true;
            listBox.IntegralHeight = true;
            listBox.ColumnWidths = 50;

            // Set additional properties inherited from ActiveXControl
            listBox.IsEnabled = true;
            listBox.IsLocked = false;
            listBox.IsTransparent = false;
            listBox.IsAutoSize = false;
            listBox.IMEMode = InputMethodEditorMode.NoControl;
            listBox.TextAlign = TextAlignmentType.Left;
            listBox.IsVisible = true;
            listBox.Shadow = false;
            listBox.LinkedCell = "A1";
            listBox.ListFillRange = "A2:A5";

            // Add some sample data to the worksheet for the ListBox
            worksheet.Cells["A2"].PutValue("Item1");
            worksheet.Cells["A3"].PutValue("Item2");
            worksheet.Cells["A4"].PutValue("Item3");
            worksheet.Cells["A5"].PutValue("Item4");

            // Save the workbook
            workbook.Save("ListBoxActiveXControlDemo.xlsx");

            // Output the results
            Console.WriteLine("ListBox ActiveX Control created and configured successfully.");
        }
    }
}
```

### See Also

* class [ActiveXControl](../activexcontrol/)
* namespace [Aspose.Cells.Drawing.ActiveXControls](../../aspose.cells.drawing.activexcontrols/)
* assembly [Aspose.Cells](../../)


