Class FormCtlDbListBox

Introduction

Class for working with Database List Box controls in a form.

EventArgsCallbackT

All EventArgsCallbackT callbacks include control_src as a keyword argument.

A callback can be in the format of:

def on_some_event(
    src: Any, event: EventArgs, control_src: FormCtlDbListBox, *args, **kwargs
) -> None:
    pass

or

def on_some_event(src: Any, event: EventArgs, *args, **kwargs) -> None:
    # can get control from kwargs
    ctl = cast(FormCtlDbListBox, kwargs['control_src'])

Class

class ooodev.form.controls.database.FormCtlDbListBox(ctl, lo_inst=None)[source]

Bases: FormCtlListBox, DataAwareControlModelPartial, UpdateEvents

com.sun.star.form.component.DatabaseListBox control

Parameters:
  • ctl (XControl) –

  • lo_inst (LoInst | None) –

__init__(ctl, lo_inst=None)[source]

Constructor

Parameters:
  • ctl (XControl) – Control supporting com.sun.star.form.component.DatabaseListBox service.

  • lo_inst (LoInst, optional) – Lo Instance. Use when creating multiple documents. Defaults to None.

Return type:

None

Note

If the LoContext manager is use before this class is instantiated, then the Lo instance will be set using the current Lo instance. That the context manager has set. Generally speaking this means that there is no need to set lo_inst when instantiating this class.

See also

Class Forms.

add_event_action_events_disposing(cb)

Adds a listener for an event.

Event is invoked when the broadcaster is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_action_performed(cb)

Adds a listener for an event.

Event is invoked when an action is performed.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.ActionEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_all_items_removed(cb)

Adds a listener for an event.

Event is invoked when the list has been completely cleared, i.e. after an invocation of XItemList.removeAllItems()

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_approve_reset(cb)

Adds a listener for an event.

Event is invoked is invoked before a component is reset. If event is canceled then the reset will be canceled.

The callback CancelEventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Note

The callback event will be CancelEventArgs. If the CancelEventArgs.cancel is set to True then the reset will be canceled if the CancelEventArgs.handled is set to True then the reset will be performed.

Return type:

None

Parameters:

cb (Any) –

add_event_approve_update(cb)

Adds a listener for an event.

Event is invoked to check the current data. If event is canceled then the update will be canceled.

The callback CancelEventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Note

The callback event will be CancelEventArgs. If the CancelEventArgs.cancel is set to True then the update will be canceled if the CancelEventArgs.handled is set to True then the update will be performed.

Return type:

None

Parameters:

cb (Any) –

add_event_change(cb)

Adds a listener for an event.

Event is invoked when the data of a component has been changed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_change_events_disposing(cb)

Adds a listener for an event.

Event is invoked when the broadcaster is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_focus_events_disposing(cb)

Adds a listener for an event.

Event is invoked when the broadcaster is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_focus_gained(cb)

Adds a listener for an event.

Event is invoked when a window gains the keyboard focus.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.FocusEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_focus_lost(cb)

Adds a listener for an event.

Event is invoked when a window loses the keyboard focus.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.FocusEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_item_events_disposing(cb)

Adds a listener for an event.

Event is invoked when the broadcaster is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_item_list_changed(cb)

Adds a listener for an event.

Event is invoked when the changes to the item list which occurred are too complex to be notified in single events.

Consumers of this event should discard their cached information about the current item list, and completely refresh it from the XItemList’s current state.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_item_list_events_disposing(cb)

Adds a listener for an event.

Event is invoked when the broadcaster is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_item_state_changed(cb)

Adds a listener for an event.

Event is invoked when an item changes its state.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.ItemEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_key_events_disposing(cb)

Adds a listener for an event.

Event is invoked when the broadcaster is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_key_pressed(cb)

Adds a listener for an event.

Event is invoked when a key has been pressed.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.KeyEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_key_released(cb)

Adds a listener for an event.

Event is invoked when a key has been released.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.KeyEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_list_item_inserted(cb)

Adds a listener for an event.

Event is invoked when an item is inserted into the list.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.ItemListEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_list_item_modified(cb)

Adds a listener for an event.

Event is invoked when an item in the list is modified, i.e. its text or image changed.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.ItemListEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_list_item_removed(cb)

Adds a listener for an event.

Event is invoked when an item is removed from the list.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.ItemListEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_mouse_dragged(cb)

Adds a listener for an event.

Event is invoked when a mouse button is pressed on a window and then dragged.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.MouseEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_mouse_entered(cb)

Adds a listener for an event.

Event is invoked when the mouse enters a window.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.MouseEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_mouse_events_disposing(cb)

Adds a listener for an event.

Event is invoked when the broadcaster is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_mouse_exited(cb)

Adds a listener for an event.

Event is invoked when the mouse exits a window.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.MouseEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_mouse_motion_events_disposing(cb)

Adds a listener for an event.

Event is invoked when the broadcaster is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_mouse_moved(cb)

Adds a listener for an event.

Event Is invoked when the mouse pointer has been moved on a window (with no buttons down).

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.MouseEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_mouse_pressed(cb)

Adds a listener for an event.

Event is invoked when a mouse button has been pressed on a window.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.MouseEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_mouse_released(cb)

Adds a listener for an event.

Event is invoked when a mouse button has been released on a window.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.MouseEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_paint_events_disposing(cb)

Adds a listener for an event.

Event is invoked when the broadcaster is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_properties_change(names, cb)

Add properties to listen for changes.

Parameters:
  • names (Iterable[str]) – One or more property names to listen for changes.

  • cb (EventArgsCallbackT) – Callback that is invoked when an event is triggered.

Raises:

ValueError – If names is empty.

Return type:

None

Note

The callback EventArgs.event_data will contain a tuple of com.sun.star.beans.PropertyChangeEvent objects.

Each time this method is called, the previous names are removed and the new names are added.

add_event_property_change(name, cb)

Adds a listener for an event.

Event is invoked when property is changed.

The callback EventArgs.event_data will contain a com.sun.star.beans.PropertyChangeEvent struct.

Parameters:
  • name (str) – Property Name

  • cb (EventArgsCallbackT) – Callback

Return type:

None

add_event_property_change_events_disposing(name, cb)

Adds a listener for an event.

Event is invoked when the property listener is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Parameters:
  • name (str) – Property Name

  • cb (EventArgsCallbackT) – Callback

Return type:

None

add_event_reset_events_disposing(cb)

Adds a listener for an event.

Event is invoked when the broadcaster is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_resetted(cb)

Adds a listener for an event.

Event is invoked when a component has been reset.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_update_events_disposing(cb)

Adds a listener for an event.

Event is invoked when the broadcaster is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_updated(cb)

Adds a listener for an event.

Event is invoked when an object has finished processing the updates and the data has been successfully written.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_vetoable_change(name, cb)

Adds a listener for an event.

Event is invoked when property is changed.

The callback EventArgs.event_data will contain a com.sun.star.beans.PropertyChangeEvent struct.

Parameters:
  • name (str) – Property Name

  • cb (EventArgsCallbackT) – Callback

Return type:

None

add_event_vetoable_change_events_disposing(name, cb)

Adds a listener for an event.

Event is invoked when the property listener is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Parameters:
  • name (str) – Property Name

  • cb (EventArgsCallbackT) – Callback

Return type:

None

add_event_window_events_disposing(cb)

Adds a listener for an event.

Event is invoked when the broadcaster is about to be disposed.

The callback EventArgs.event_data will contain a UNO com.sun.star.lang.EventObject struct.

Return type:

None

Parameters:

cb (Any) –

add_event_window_hidden(cb)

Adds a listener for an event.

Event is invoked when the window has been hidden.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.WindowEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_window_moved(cb)

Adds a listener for an event.

Event is invoked when the window has been moved.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.WindowEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_window_paint(cb)

Adds a listener for an event.

Event Is invoked when a region of the window became invalid, e.g. when another window has been moved away.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.PaintEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_window_resized(cb)

Adds a listener for an event.

Event is invoked when the window has been resized.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.WindowEvent struct.

Return type:

None

Parameters:

cb (Any) –

add_event_window_shown(cb)

Adds a listener for an event.

Event is invoked when the window has been shown.

The callback EventArgs.event_data will contain a UNO com.sun.star.awt.WindowEvent struct.

Return type:

None

Parameters:

cb (Any) –

apply_styles(*styles)

Applies styles to control

Parameters:

*styles (StyleT) – Styles to apply

Return type:

None

assign_script(interface_name, method_name, script_name, loc, language=LanguageKind.PYTHON)

Binds a macro to a form control.

Method is Lo Instance Safe for use with multiple documents.

Parameters:
  • interface_name (str, XInterface) – Interface Name or a UNO object that implements the XInterface.

  • method_name (str) – Method Name.

  • script_name (str) – Script Name.

  • loc (str) – can be user, share, document, and extensions.

  • language (str | LanguageKind, optional) – Language. Defaults to LanguageKind.PYTHON.

Return type:

None

fire_event_properties_change(names)

Fires a sequence of PropertyChangeEvents

Parameters:

names (Iterable[str]) – Sequence of property names to fire event for.

Return type:

None

get_control()

Gets the control

Return type:

XControl

get_form_component_kind()[source]

Gets the kind of form component this control is

Return type:

FormComponentKind

get_form_name()

Gets form name for the current control

Parameters:

ctl_model (XControlModel) – control model

Returns:

form name on success; Otherwise, empty string.

Return type:

str

get_id()

Gets class id for this control.

Returns:

Class Id if found, Otherwise -1

Return type:

int

get_item(index)

Gets the item at the specified index

Parameters:

index (int) – Index of the item to get

Return type:

str

Returns:

The item at the specified index

get_model()

Gets the model for this control

Return type:

UnoControlModel

get_property(name, default=<object object>)

Get property value

Parameters:
  • name (str) – Property Name.

  • default (Any, optional) – Return value if property value is None.

Returns:

Property value or default.

Return type:

Any

get_property_set()

Gets the property set for this control.

Return type:

XPropertySet

get_uno_srv_name()

Get Uno service name

Return type:

str

get_view()

Gets the view of this control

Return type:

UnoControl

remove_event_action_events_disposing(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_action_performed(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_all_items_removed(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_approve_reset(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_approve_update(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_change(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_change_events_disposing(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_focus_events_disposing(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_focus_gained(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_focus_lost(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_item_events_disposing(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_item_list_changed(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_item_list_events_disposing(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_item_state_changed(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_key_events_disposing(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_key_pressed(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_key_released(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_list_item_inserted(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_list_item_modified(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_list_item_removed(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_mouse_dragged(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_mouse_entered(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_mouse_events_disposing(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_mouse_exited(cb)

Removes a listener for an event.

Return type:

None

Parameters:

cb (Any) –

remove_event_mouse_motion_events_disposing(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_mouse_moved(cb)

Removes a listener for an event.

Return type:

None

Parameters:

cb (Any) –

remove_event_mouse_pressed(cb)

Removes a listener for an event.

Event is invoked when a mouse button has been pressed on a window.

Return type:

None

Parameters:

cb (Any) –

remove_event_mouse_released(cb)

Removes a listener for an event.

Return type:

None

Parameters:

cb (Any) –

remove_event_paint_events_disposing(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_properties_listener()

Remove Properties Listener

Return type:

None

remove_event_property_change(name)

Removes a listener for an event

Parameters:

name (str) – Property Name

Return type:

None

remove_event_property_change_events_disposing(name)

Removes a listener for an event

Parameters:

name (str) – Property Name

Return type:

None

remove_event_reset_events_disposing(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_resetted(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_update_events_disposing(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_updated(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_vetoable_change(name)

Removes a listener for an event

Parameters:

name (str) – Property Name

Return type:

None

remove_event_vetoable_change_events_disposing(name)

Removes a listener for an event

Parameters:

name (str) – Property Name

Return type:

None

remove_event_window_events_disposing(cb)

Removes a listener for an event.

Return type:

None

Parameters:

cb (Any) –

remove_event_window_hidden(cb)

Removes a listener for an event.

Return type:

None

Parameters:

cb (Any) –

remove_event_window_moved(cb)

Removes a listener for an event.

Return type:

None

Parameters:

cb (Any) –

remove_event_window_paint(cb)

Removes a listener for an event

Return type:

None

Parameters:

cb (Any) –

remove_event_window_resized(cb)

Removes a listener for an event.

Return type:

None

Parameters:

cb (Any) –

remove_event_window_shown(cb)

Removes a listener for an event.

Return type:

None

Parameters:

cb (Any) –

set_list_data(data)

Sets the list data

Parameters:

data (Iterable[str]) – List box entries

Return type:

None

set_property(**kwargs)

Set property value

Parameters:

**kwargs (Any) – Variable length Key value pairs used to set properties.

Return type:

None

New in version 0.39.1.

Return type:

None

Parameters:

kwargs (Any) –

property border: BorderKind

Gets/Sets the border style

Return type:

BorderKind

property bound_column: int

Gets/Sets the bound column.

Specifies which column of the list result set should be used for data exchange.

When you make a selection from a list box, the “BoundColumn” property reflects which column value of a result set should be used as the value of the component. If the control is bound to a database field, the column value is stored in the database field identified by the property com.sun.star.form.DataAwareControlModel.DataField.

Returns:

If -1 then the index (starting at 0) of the selected list box entry is stored in the current database field. If 0 or greater, the column value of the result set at the position (0-indexed) is stored in the current database field. In particular, for value 0, the selected (displayed) list box string is stored.

Return type:

int

Note

The bound column property is only used if a list source is defined and the list source matches with the types com.sun.star.form.ListSourceType.TABLE, com.sun.star.form.ListSourceType.QUERY, com.sun.star.form.ListSourceType.SQL or com.sun.star.form.ListSourceType.SQLPASSTHROUGH. Otherwise the property is ignored, as there is no result set from which to get the column values.

property bound_field: com.sun.star.beans.XPropertySet

Gets/Sets the name of the field in the data source to which the control is bound.

Return type:

XPropertySet

property component_type: int

Gets the form component type.

The return value is a com.sun.star.form.FormComponentType constant.

Returns:

Form component type

Return type:

int

New in version 0.14.1.

property control_shape: com.sun.star.drawing.ControlShape

Gets the owner of the control

Return type:

ControlShape

property data_field: str

Gets/Sets the name of the field in the data source to which the control is bound.

Return type:

str

property drop_down: bool

Gets/Sets the DropDown property

Return type:

bool

property enabled: bool

Gets/Sets the enabled state for the control

Return type:

bool

property events_listener_action: ActionListener

Returns listener

Return type:

ActionListener

property events_listener_change: ChangeListener

Returns listener

Return type:

ChangeListener

property events_listener_focus: FocusListener

Returns listener

Return type:

FocusListener

property events_listener_item: ItemListener

Returns listener

Return type:

ItemListener

property events_listener_item_list: ItemListListener

Returns listener

Return type:

ItemListListener

property events_listener_key: KeyListener

Returns listener

Return type:

KeyListener

property events_listener_mouse: MouseListener

Returns listener

Return type:

MouseListener

property events_listener_mouse_motion: MouseMotionListener

Returns listener

Return type:

MouseMotionListener

property events_listener_paint: PaintListener

Returns listener

Return type:

PaintListener

property events_listener_properties_change_implement: PropertiesChangeListener

Returns listener

Return type:

PropertiesChangeListener

property events_listener_reset: ResetListener

Returns listener

Return type:

ResetListener

property events_listener_update: UpdateListener

Returns listener

Return type:

UpdateListener

property events_listener_window: WindowListener

Returns listener

Return type:

WindowListener

property help_text: str

Gets/Sets the tip text

Return type:

str

property help_url: str

Gets/Sets the help url

Return type:

str

property input_required: bool

Gets/Sets whether or not input into this field is required, when it is actually bound to a database field.

Return type:

bool

property label_control: com.sun.star.beans.XPropertySet

Gets/Sets references to a control model within the same document which should be used as a label.

Return type:

XPropertySet

property line_count: int

Gets/Sets the line count

Return type:

int

property list_count: int

Gets the number of items in the list

Return type:

int

property list_index: int

Gets which item is selected

Return type:

int

Returns:

Index of the first selected item or -1 if no items are selected.

property list_source: Tuple[str, ...]

Gets/Sets the list source

Returns:

The list source

Return type:

Tuple[str, …]

property list_source_type: ListSourceType

Gets/Sets the list source type

Returns:

The list source type

Return type:

ListSourceType

property lo_inst: LoInst

Lo Instance

Return type:

LoInst

property model: com.sun.star.form.component.ListBox

Gets the model for this control

Return type:

ListBox

property multi_selection: bool

Gets/Sets the MultiSelection property

Return type:

bool

property name: str

Gets the name for the control model

Return type:

str

property position: GenericUnitPoint[UnitMM, float]

Gets the Position of the control in UnitMM Values.

Return type:

GenericUnitPoint[UnitMM, float]

property printable: bool

Gets/Sets the printable property

Return type:

bool

property read_only: bool

Gets/Sets the read only property

Return type:

bool

property row_source: Tuple[str, ...]

Gets/Sets the row source.

When setting the row source, the list box will be cleared and the new items will be added.

The value passed in can be any iterable string such as a list or tuple of strings.

Return type:

Tuple[str, ...]

property selected_items: Tuple[int, ...]

Gets/Sets the selected items.

When setting the selected items, any iterable of integers can be passed in such as a list or tuple of integers.

Returns:

Tuple of selected items

Return type:

Tuple[int, …]

Changed in version 0.19.1: Allows setting the selected items

property selected_value: Any

Gets The selected value, if there is at most one.

Returns:

The selected value

Return type:

Any

property size: GenericUnitSize[UnitMM, float]

Gets the size of the control in UnitMM Values.

Return type:

GenericUnitSize[UnitMM, float]

property step: int

Gets/Sets the step

Return type:

int

property tab_index: int

Gets/Sets the tab index

Return type:

int

property tab_stop: bool

Gets/Sets the tab stop property

Return type:

bool

property tag: str

Gets/Sets the tag

Return type:

str

property tip_text: str

Gets/Sets the tip text

Return type:

str

property view: com.sun.star.form.control.ListBox

Gets the view of this control

Return type:

ListBox