ooodev.adapter.awt.uno_control_edit_model_partial module

class ooodev.adapter.awt.uno_control_edit_model_partial.UnoControlEditModelPartial(component)[source]

Bases: UnoControlModelPartial

Partial class for UnoControlEditModel.

Parameters:

component (UnoControlEditModel) –

__init__(component)[source]

Constructor

Parameters:

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

set_font_descriptor(font_descriptor)[source]

Sets the font descriptor of the control.

Parameters:

font_descriptor (FontDescriptor, FontDescriptorStructComp) – UNO Struct - Font descriptor to set.

Return type:

None

Note

The font_descriptor property can also be used to set the font descriptor.

Hint

  • FontDescriptor can be imported from ooo.dyn.awt.font_descriptor.

Return type:

None

Parameters:

font_descriptor (FontDescriptor | FontDescriptorStructComp) –

property align: AlignKind

Get/Sets the horizontal alignment of the text in the control.

Hint

  • AlignKind can be imported from ooodev.utils.kind.align_kind.

Return type:

AlignKind

property auto_h_scroll: bool | None

Gets/Sets - If set to True an horizontal scrollbar will be added automatically when needed.

optional

Return type:

bool | None

property auto_v_scroll: bool | None

Gets/Sets - If set to True a vertical scrollbar will be added automatically when needed.

optional

Return type:

bool | None

property background_color: Color

Gets/Set the background color of the control.

Returns:

Color

Return type:

Color

property border: BorderKind

Gets/Sets the border style of the control.

Note

Value can be set with BorderKind or int.

Hint

  • BorderKind can be imported from ooodev.utils.kind.border_kind.

Return type:

BorderKind

property border_color: Color

Gets/Sets the color of the border, if present

Not every border style (see Border) may support coloring. For instance, usually a border with 3D effect will ignore the border_color setting.

Returns:

Color

Return type:

Color

property echo_char: str

Gets/Sets the echo character as a string

Return type:

str

property enabled: bool

Gets/Sets whether the control is enabled or disabled.

Return type:

bool

property font_descriptor: FontDescriptorStructComp

Gets/Sets the Font Descriptor.

Setting value can be done with a FontDescriptor or FontDescriptorStructComp object.

Returns:

Font Descriptor

Return type:

FontDescriptorStructComp

Hint

  • FontDescriptor can be imported from ooo.dyn.awt.font_descriptor.

property font_emphasis_mark: FontEmphasisEnum

Gets/Sets the FontEmphasis value of the text in the control.

Note

Value can be set with FontEmphasisEnum or int.

Hint

  • FontEmphasisEnum can be imported from ooo.dyn.text.font_emphasis.

Return type:

FontEmphasisEnum

property font_relief: FontReliefEnum

Gets/Sets FontRelief value of the text in the control.

Note

Value can be set with FontReliefEnum or int.

Hint

  • FontReliefEnum can be imported from ooo.dyn.text.font_relief.

Return type:

FontReliefEnum

property h_scroll: bool

Gets/Sets if the content of the control can be scrolled in the horizontal direction.

Return type:

bool

property hard_line_breaks: bool

Gets/Sets if hard line breaks will be returned in the XTextComponent.getText() method.

Return type:

bool

property help_text: str

Get/Sets the help text of the control.

Return type:

str

property help_url: str

Gets/Sets the help URL of the control.

Return type:

str

property hide_inactive_selection: bool | None

Gets/Sets whether the selection in the control should be hidden when the control is not active (focused).

optional

Return type:

bool | None

property line_end_format: LineEndFormatEnum | None

specifies which line end type should be used for multi line text

Controls working with this model care for this setting when the user enters text. Every line break entered into the control will be treated according to this setting, so that the Text property always contains only line ends in the format specified.

Possible values are all constants from the LineEndFormat group.

Note that this setting is usually not relevant when you set new text via the API. No matter which line end format is used in this new text then, usual control implementations should recognize all line end formats and display them properly.

optional

Note

Value can be set with LineEndFormatEnum or int.

Hint

  • LineEndFormatEnum can be imported from ooo.dyn.awt.line_end_format.

Return type:

LineEndFormatEnum | None

property max_text_len: int

Gets/Sets the maximum character count.

There’s no limitation, if set to 0.

Return type:

int

property multi_line: bool

Gets/Sets that the text may be displayed on more than one line.

Return type:

bool

property paint_transparent: bool | None

Gets/Sets whether the control paints it background or not.

optional

Return type:

bool | None

property printable: bool

Gets/Sets that the control will be printed with the document.

Return type:

bool

property read_only: bool

Gets/Sets if the content of the control cannot be modified by the user.

Return type:

bool

property tabstop: bool

Gets/Sets if the control can be reached with the TAB key.

Return type:

bool

property text: str

Gets/Sets the text displayed in the control.

Return type:

str

property text_color: Color

Gets/Sets the text color of the control.

Return type:

NewType()(Color, int)

property text_line_color: Color

Gets/Sets the text line color (RGB) of the control.

Return type:

NewType()(Color, int)

property v_scroll: bool

Gets/Sets if the content of the control can be scrolled in the vertical direction.

Return type:

bool

property vertical_align: VerticalAlignment | None

Gets/Sets the vertical alignment of the text in the control.

optional

Hint

  • VerticalAlignment can be imported from ooo.dyn.style.vertical_alignment

Return type:

VerticalAlignment | None

property writing_mode: int | None

Denotes the writing mode used in the control, as specified in the com.sun.star.text.WritingMode2 constants group.

Only LR_TB (0) and RL_TB (1) are supported at the moment.

optional

Return type:

int | None