XlsComboBoxShape module

class XlsComboBoxShape.XlsComboBoxShape

Bases: XlsShape, IComboBoxShape

Represents a combo box shape in an Excel worksheet.

This class provides properties and methods for manipulating combo box shapes in Excel, including drop-down options, selection, and appearance. It extends XlsShape and implements the IComboBoxShape interface.

property ComboType: ExcelComboType

Gets the type of the combo box.

Returns:

An enumeration value representing the combo box type.

Return type:

ExcelComboType

property Display3DShading: bool

Gets or sets whether the combo box displays 3D shading.

Returns:

True if 3D shading is displayed; otherwise, False.

Return type:

bool

property DropDownLines: int

Gets or sets the number of lines displayed in the drop-down portion of the combo box.

Returns:

The number of lines in the drop-down list.

Return type:

int

property ListFillRange: IXLSRange

Gets or sets the cell range that contains the list items for the combo box.

Returns:

A range object representing the source of the list items.

Return type:

IXLSRange

property SelectedIndex: int

Gets or sets the index of the selected item in the combo box.

Returns:

The zero-based index of the selected item.

Return type:

int

property SelectedValue: str

Gets the currently selected value in the combo box.

Returns:

The text of the currently selected item.

Return type:

str

property ShapeType: ExcelShapeType

Gets the type of the shape.

Returns:

An enumeration value representing the type of the shape.

Return type:

ExcelShapeType