ListStyle module

class ListStyle.ListStyle

Bases: Style, IStyle

Represents a list style.

Clone() ListStyle

Clones the list style.

Returns:

The cloned list style.

Return type:

IStyle

static CreateEmptyListStyle(doc: IDocument, listType: ListType, isOneLevelList: bool) ListStyle

Creates an empty list style.

Parameters:
  • doc (IDocument) – The document.

  • listType (ListType) – The type of the list.

  • isOneLevelList (bool) – Indicates whether the list has only one level.

Returns:

The created empty list style.

Return type:

ListStyle

GetNearLevel(levelNumber: int) ListLevel

Gets the nearest level to the specified level number.

Parameters:

levelNumber (int) – The level number.

Returns:

The nearest level to the specified level number.

Return type:

ListLevel

property Levels: ListLevelCollection

Gets the levels of the list.

Returns:

The levels of the list.

Return type:

ListLevelCollection

property ListType: ListType

Gets or sets the type of the list.

Returns:

The type of the list.

Return type:

ListType

property StyleType: StyleType

Gets the type of the style.

Returns:

The type of the style.

Return type:

StyleType

ToString() str
Returns:

str