module ctl_base

class ooodev.dialog.dl_control.ctl_base.CtlBase(ctl)[source]

Bases: Base, LoInstPropsPartial, ViewPropPartial, ModelPropPartial, EventsPartial

Control Base Class

Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

Any

__init__(ctl)[source]

Constructor.

Parameters:
  • lo_inst (LoInst, optional) – Lo instance.

  • ctl (Any) –

Return type:

None

get_control_props()[source]

Gets property set for a control model

Parameters:

control_model (Any) – control model

Returns:

Property set

Return type:

XPropertySet | None

get_model()[source]

Gets the Model for the control

Return type:

XControlModel

get_uno_srv_name()[source]

Get Uno service name

Return type:

str

get_view()[source]
Return type:

XControl

get_view_ctl()
Return type:

XControl

property visible: bool

Gets/Sets the visible state for the control

Return type:

bool

property x: UnitPX

Gets/Sets the X position for the control in pixel units.

When setting can be an integer in Pixels Units or a UnitT.

Returns:

X position of the control.

Return type:

UnitPX

Note

The X is in Pixel units; however, the model is in AppFont units. This property will convert the AppFont units to Pixel units. When set using UnitAppFontX no conversion is done.

property y: UnitPX

Gets/Sets the Y position for the control in pixel units.

When setting can be an integer in Pixels Units or a UnitT.

Returns:

Y position of the control.

Return type:

UnitPX

Note

The Y is in Pixel units; however, the model is in AppFont units. This property will convert the AppFont units to Pixel units. When set using UnitAppFontY no conversion is done.

class ooodev.dialog.dl_control.ctl_base.CtlListenerBase(ctl)[source]

Bases: CtlBase, UnoControlDialogElementPartial, FocusEvents, KeyEvents, MouseEvents, MouseMotionEvents, PaintEvents, WindowEvents, PropertyChangeImplement, PropertiesChangeImplement, VetoableChangeImplement

Dialog Control Listener Base Class

Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

Any

__init__(ctl)[source]

Constructor.

Parameters:
  • lo_inst (LoInst, optional) – Lo instance.

  • ctl (Any) –

Return type:

None

get_property_set()[source]

Gets the property set for this control

Return type:

XPropertySet

get_uno_srv_name()[source]

Get Uno service name

Return type:

str

property height: UnitPX

Gets/Sets the height of the control in Pixel units.

When setting can be an integer in Pixels Units or a UnitT.

Returns:

Height of the control.

Return type:

UnitPX

Note

The Height is in Pixel units; however, the model is in AppFont units. This property will convert the AppFont units to Pixel units. When set using UnitAppFontHeight no conversion is done.

property width: UnitPX

Gets the width of the control

Return type:

UnitPX

class ooodev.dialog.dl_control.ctl_base.DialogControlBase(ctl)[source]

Bases: CtlListenerBase

Dialog Control Base Class. Only for Controls that have a model that can be added to a dialog

Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

Any

__init__(ctl)[source]

Constructor.

Parameters:
  • lo_inst (LoInst, optional) – Lo instance.

  • ctl (Any) –

Return type:

None

apply_styles(*styles)[source]

Applies styles to control

Parameters:

*styles (StyleT) – Styles to apply

Return type:

None

get_control_kind()[source]

Gets the control kind

Return type:

DialogControlKind

get_control_named_kind()[source]

Gets the control named kind

Return type:

DialogControlNamedKind

get_uno_srv_name()[source]

Get Uno service name

Return type:

str

property help_text: str

Gets/Sets the tip text

Return type:

str

property step: int

Gets/Sets the step

Return type:

int

property tab_index: int

Gets/Sets the tab index

Return type:

int

property tag: str

Gets/Sets the tag

Return type:

str

property tip_text: str

Gets/Sets the tip text

Return type:

str