ooodev.adapter.awt.list_box_partial module

class ooodev.adapter.awt.list_box_partial.ListBoxPartial(component, interface=com.sun.star.awt.XListBox)[source]

Bases: object

Partial class for XListBox.

Parameters:
  • component (XListBox) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.awt.XListBox)[source]

Constructor

Parameters:
  • component (XListBox) – UNO Component that implements com.sun.star.awt.XListBox interface.

  • interface (UnoInterface, optional) – The interface to be validated. Defaults to XListBox.

Return type:

None

add_action_listener(listener)[source]

Registers a listener for action events.

Return type:

None

Parameters:

listener (com.sun.star.awt.XActionListener) –

add_item(item, pos)[source]

Adds an item at the specified position.

Return type:

None

Parameters:
  • item (str) –

  • pos (int) –

add_item_listener(listener)[source]

Registers a listener for item events.

Return type:

None

Parameters:

listener (com.sun.star.awt.XItemListener) –

add_items(pos, *items)[source]

Adds multiple items at the specified position.

Return type:

None

Parameters:
  • pos (int) –

  • items (str) –

get_drop_down_line_count()[source]

Gets the number of visible lines in drop down mode.

Return type:

int

get_item(pos)[source]

Gets the item at the specified position.

Return type:

str

Parameters:

pos (int) –

get_item_count()[source]

Gets the number of items in the listbox.

Return type:

int

get_items()[source]

Gets all items of the list box.

Return type:

Tuple[str, ...]

get_selected_item()[source]

Gets the currently selected item.

When multiple items are selected, the first one is returned. When nothing is selected, an empty string is returned.

Return type:

str

get_selected_item_pos()[source]

GEts the position of the currently selected item.

When multiple items are selected, the position of the first one is returned. When nothing is selected, -1 is returned.

Return type:

int

get_selected_items()[source]

Gets all currently selected items.

Return type:

Tuple[str, ...]

get_selected_items_pos()[source]

Gets the positions of all currently selected items.

Return type:

Tuple[int, ...]

is_multiple_mode()[source]

Gets - returns True if multiple items can be selected, False if only one item can be selected.

Return type:

bool

make_visible(entry)[source]

Makes the item at the specified position visible by scrolling.

Return type:

None

Parameters:

entry (int) –

remove_action_listener(listener)[source]

Un-registers a listener for action events.

Return type:

None

Parameters:

listener (com.sun.star.awt.XActionListener) –

remove_item_listener(listener)[source]

Un-registers a listener for item events.

Return type:

None

Parameters:

listener (com.sun.star.awt.XItemListener) –

remove_items(pos, count)[source]

Removes a number of items at the specified position.

Return type:

None

Parameters:
  • pos (int) –

  • count (int) –

select_item(item, select)[source]

Selects/deselects the specified item.

Return type:

None

Parameters:
  • item (str) –

  • select (bool) –

select_item_pos(pos, select)[source]

Selects/deselects the item at the specified position.

Return type:

None

Parameters:
  • pos (int) –

  • select (bool) –

select_items_pos(select, *positions)[source]

selects/deselects multiple items at the specified positions.

Return type:

None

Parameters:
  • select (bool) –

  • positions (int) –

set_drop_down_line_count(lines)[source]

Sets the number of visible lines for drop down mode.

Return type:

None

Parameters:

lines (int) –

set_multiple_mode(multi)[source]

Determines if only a single item or multiple items can be selected.

Return type:

None

Parameters:

multi (bool) –