ooodev.adapter.awt.text_component_partial module
- class ooodev.adapter.awt.text_component_partial.TextComponentPartial(component, interface=com.sun.star.awt.XTextComponent)[source]
Bases:
object
Partial class for XTextComponent.
- Parameters:
component (XTextComponent) –
interface (UnoInterface | None) –
- __init__(component, interface=com.sun.star.awt.XTextComponent)[source]
Constructor
- Parameters:
component (XTextComponent) – UNO Component that implements
com.sun.star.awt.XTextComponent
interface.interface (UnoInterface, optional) – The interface to be validated. Defaults to
XTextComponent
.
- Return type:
None
- add_text_listener(listener)[source]
Registers a text event listener.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XTextListener) –
- insert_text(sel, text)[source]
Inserts text at the specified position.
- Return type:
None
- Parameters:
sel (com.sun.star.awt.Selection) –
text (str) –
Hint
Selection
can be imported fromooo.dyn.awt.selection
.
- remove_text_listener(listener)[source]
Un-registers a text event listener.
- Return type:
None
- Parameters:
listener (com.sun.star.awt.XTextListener) –
- set_editable(editable)[source]
Makes the text editable for the user or read-only.
- Return type:
None
- Parameters:
editable (bool) –
- set_max_text_len(length)[source]
Sets the maximum text length.
- Return type:
None
- Parameters:
length (int) –