ooodev.adapter.awt.tree.tree_control_model_partial module

class ooodev.adapter.awt.tree.tree_control_model_partial.TreeControlModelPartial(component)[source]

Bases: UnoControlModelPartial

Partial class for TreeControlModel.

Parameters:

component (TreeControlModel) –

__init__(component)[source]

Constructor

Parameters:

component (Any) – Component that implements com.sun.star.awt.TreeControlModel service.

Return type:

None

property data_model: com.sun.star.awt.tree.XTreeDataModel

Specifies the XTreeDataModel that is providing the hierarchical data.

You can implement your own instance of XTreeDataModel or use the MutableTreeDataModel.

Return type:

XTreeDataModel

property editable: bool

Gets/Sets whether the nodes of the tree are editable.

The default value is False.

Return type:

bool

property invokes_stop_node_editing: bool

Gets/Sets what happens when editing is interrupted by selecting another node in the tree, a change in the tree’s data, or by some other means.

Setting this property to True causes the changes to be automatically saved when editing is interrupted. False means that editing is canceled and changes are lost

The default value is False.

Return type:

bool

property root_displayed: bool

Gets/Sets if the root node of the tree is displayed.

If RootDisplayed is set to False, the root node of a model is no longer a valid node for the XTreeControl and can’t be used with any method of XTreeControl.

The default value is True.

Return type:

bool

property row_height: UnitPX

Gets/Sets the height of each row, in pixels units.

If the specified value is less than or equal to zero, the row height is the maximum height of all rows.

The default value is 0

Returns:

Row height in pixels.

Return type:

UnitPX

Note

Value can be set as an integer or a UnitPX instance.

property selection_type: SelectionType

Gets/Sets the selection mode that is enabled for this tree.

The default value is com.sun.star.view.SelectionType.NONE

Hint

  • SelectionType can be imported from ooo.dyn.view.selection_type

Return type:

SelectionType

property shows_handles: bool

Gets/Sets whether the node handles should be displayed. The handles are doted lines that visualize the tree like hierarchy.

The default value is True.

Return type:

bool

property shows_root_handles: bool

Gets/Sets whether the node handles should also be displayed at root level.

The default value is True.

Return type:

bool