Skip to content

ControlProperties

Implementation of the control properties class

ControlProperties

Canonical path: ControlProperties.ControlProperties

Implementation of the control properties class

as_slider property writable

as_slider: bool

Get the control as slider state

Returns:

  • bool

    control as slider state

background_color property writable

background_color: str

Get the background color of the control

Returns:

  • str

    background color of the control

constraint property writable

constraint: list[str]

Get the constraint name of the control

Returns:

  • list[str]

    constraint

control_type property writable

control_type: ControlType

Get the control type of the control

Returns:

enable property writable

enable: bool

Get the enable state of the control

Returns:

  • bool

    enable state

enable_condition property writable

enable_condition: str

Get the enable condition of the control

Returns:

  • str

    enable condition

enable_function property writable

enable_function: Callable[..., bool] | None

Get the enable function of the control

Returns:

  • Callable[..., bool] | None

    enable function

event_id property writable

event_id: str

Get the event id of the control

Returns:

  • str

    event ID

expander_name property writable

expander_name: str

Get the name of the current expander control

Returns:

  • str

    expander name of the control.

expander_state_key property writable

expander_state_key: str

Get the expander state key of the control

Returns:

  • str

    expander state key.

font_face_code property writable

font_face_code: int

Get the font face code of the control

Returns:

  • int

    font face code of the control

font_style property writable

font_style: int

Get the font style of the control

Returns:

  • int

    font style of the control

group_text property writable

group_text: str

Get the group text of the property

Returns:

  • str

    text of the property.

height property writable

height: int

Get the height of the control

Returns:

  • int

    height of the control

interval_value property writable

interval_value: str

Get the interval value of the control

Returns:

  • str

    interval value

list_group_name property writable

list_group_name: str

Get the name of the list group

Returns:

  • str

    name of the list group

max_value property writable

max_value: int | float

Get the max value of the control

Returns:

  • int | float

    maximal value

max_value_condition property writable

max_value_condition: str

Get the max value condition of the control

Returns:

  • str

    maximal value condition

member_text property writable

member_text: dict[str, str]

Get the member text of the property members

Returns:

  • dict[str, str]

    text of the property members

min_value property writable

min_value: int | float

Get the min value of the control

Returns:

  • int | float

    minimal value

min_value_condition property writable

min_value_condition: str

Get the min value condition of the control

Returns:

  • str

    minimal value condition

page property writable

page: int

Get the page of the control

Returns:

  • int

    page number.

palette_layout_dict property writable

palette_layout_dict: dict[str, Any]

get the palette layout dictionary

Returns:

  • dict[str, Any]

    palette layout dictionary

refresh_control property

refresh_control: bool

Get the refresh control state

Returns:

  • bool

    refresh control state

row_name property writable

row_name: str

Get the row name of the control

Returns:

  • str

    row name.

row_state_key property writable

row_state_key: str

Get the row state key of the control

Returns:

  • str

    row state key.

text property writable

text: str

Get the control text

Returns:

  • str

    control text

value_dialog property writable

value_dialog: ValueDialogType | None

Get the dialog name for the value input dialog

Returns:

  • ValueDialogType | None

    dialog name for the value input dialog

value_index_name property writable

value_index_name: str

Get the value index name of the control

Returns:

  • str

    value index name

value_list property writable

value_list: str

Get the values for the value list list like 1|2|...|...

Returns:

  • str

    value list

value_list_2 property writable

value_list_2: str

Get the second value list

Returns:

  • str

    second value list

value_list_start_row property writable

value_list_start_row: int

Get the start row of the value list row numbering inside the palette

Returns:

  • int

    value list start row

value_list_textids property

value_list_textids: str

Get the second value list

Returns:

  • str

    value list text IDs

value_name property writable

value_name: str

Get the name of the assigned value from the building element

Returns:

  • str

    value name

value_str property

value_str: str

Get the control value string

Returns:

  • str

    value string

value_text_list property writable

value_text_list: str

Get the text corresponding to the value list like Rectangle|Circle|...|...

Returns:

  • str

    value list

visible property writable

visible: bool | list[bool]

Get the visible state of the control

Returns:

  • bool | list[bool]

    visible state

visible_condition property writable

visible_condition: str

Get the visible condition of the control

Returns:

  • str

    visible condition

visible_function property writable

visible_function: Callable[..., bool] | None

Get the visible function of the control

Returns:

  • Callable[..., bool] | None

    visible function

width property writable

width: int

Get the width of the control

Returns:

  • int

    width of the control

ControlType

Canonical path: ControlProperties.ControlProperties.ControlType

Bases: IntEnum

Definition of class ControlType

__init__

__init__(
    text: str,
    value_name: str,
    enable_condition: str,
    visible_condition: str,
    page: int,
    expander_name: str,
    row_name: str,
    value_str: str,
    value_list: str,
    value_list_2: str,
    event_id: str,
    control_type: ControlType = CONTROL,
    value_index_name: str = "",
    value_list_start_row: int = 0,
    value_dialog: ValueDialogType | None = None,
    value_list_textids: str = "",
    as_slider: bool = False,
    height: str = "22",
    width: str = DEFAULT_WIDTH,
    font_style: int = 2,
    font_face_code: int = 0,
    background_color: str = "",
    row_state_key: str = "",
    expander_state_key: str = "",
)

Set the properties of the control

Parameters:

  • text (str) –

    Text of the control

  • value_name (str) –

    Name of the assigned value from the building element

  • enable_condition (str) –

    Condition for enabled state of the control

  • visible_condition (str) –

    Condition for visible state of the control

  • page (int) –

    page index of the modified property

  • expander_name (str) –

    Expander name

  • row_name (str) –

    row_name

  • value_str (str) –

    Control value as string

  • value_list (str) –

    Text with the values for the combo box list like 1|2|5|7 or

  • value_list_2 (str) –

    Second string list separated by | example 1|2|5|7 or

  • event_id (str) –

    event id of the clicked button control

  • control_type (ControlType, default: CONTROL ) –

    Type of the control

  • value_index_name (str, default: '' ) –

    Index name of the value (in case of list with single value by value index)

  • value_list_start_row (int, default: 0 ) –

    Start row of the value list row numbering inside the palette

  • value_dialog (ValueDialogType | None, default: None ) –

    Dialog type for the value input

  • value_list_textids (str, default: '' ) –

    text ID's of the value list

  • as_slider (bool, default: False ) –

    Show the control as slider

  • height (str, default: '22' ) –

    Control height in pixel, only used in a row

  • width (str, default: DEFAULT_WIDTH ) –

    Control width in pixel, only used in a row

  • font_style (int, default: 2 ) –

    font style

  • font_face_code (int, default: 0 ) –

    font face code

  • background_color (str, default: '' ) –

    Background color in the format "(red, green, blue)" with "(-1, -1, -1)" or "" as default

  • row_state_key (str, default: '' ) –

    row state key

  • expander_state_key (str, default: '' ) –

    expander state key

__repr__

__repr__() -> str

create the string from the values

Returns:

  • str

    string from the values

deep_copy

deep_copy() -> ControlProperties

deep copy of the data

Returns:

modify_visible_condition

modify_visible_condition(value_name: str, value: str)

Modify the visible condition

Parameters:

  • value_name (str) –

    Name of the value

  • value (str) –

    condition value

reset_refresh_control

reset_refresh_control()

reset the refresh state of the control

set_member_text

set_member_text(member_name: str, member_text: str)

Set the member text of the property member

Parameters:

  • member_name (str) –

    member name

  • member_text (str) –

    member text

set_visible_condition

set_visible_condition(value_name: str, condition: str)

Set the visible condition of the property

Parameters:

  • value_name (str) –

    Name of the value

  • condition (str) –

    Visible condition