Class DialogControlsPartial
- class ooodev.dialog.partial.dialog_controls_partial.DialogControlsPartial(dialog_ctl, lo_inst=None)[source]
Partial Class for Dialog Controls.
- Parameters:
dialog_ctl (UnoControlDialog) –
lo_inst (LoInst | None) –
- __init__(dialog_ctl, lo_inst=None)[source]
Dialog Controls Constructor.
- Parameters:
dialog_ctl (UnoControlDialog) – Main Dialog Window Control.
lo_inst (LoInst, optional) – Lo Instance. Use when creating multiple documents. Defaults to None.
- Return type:
None
- insert_button(*, label, x, y, width, height=20, btn_type=None, name='', dialog_ctrl=None, **props)[source]
Insert Button Control.
- Parameters:
label (str) – Button Label.
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to20. If-1, the dialog Size is not set.btn_type (PushButtonType | None, optional) – Type of Button.
name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create button control.
- Returns:
Button control.
- Return type:
Hint
PushButtonTypecan be imported fromooo.dyn.awt.push_button_type.
See also
- insert_check_box(*, label, x, y, width, height=8, tri_state=True, state=TriStateKind.CHECKED, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Inserts a check box control.
- Parameters:
label (str) – Checkbox label text.
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int,, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to8. If-1, the dialog Size is not set.tri_state (TriStateKind, optional) – Specifies that the control may have the state “don’t know”. Defaults to
True.state (TriStateKind, optional) – Specifies the state of the control.Defaults to
TriStateKind.CHECKED.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of Checkbox. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create checkbox control.
- Returns:
Check box control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.TriStateKindcan be imported fromooodev.utils.kind.tri_state_kind.
See also
- insert_combo_box(*, entries, x, y, width, height=20, max_text_len=0, drop_down=True, read_only=False, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Insert a combo box control.
- Parameters:
entries (Iterable[str]) – Combo box entries.
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to20. If-1, the dialog Size is not set.max_text_len (int, optional) – Specifies the maximum character count, There’s no limitation, if set to 0. Defaults to
0.drop_down (bool, optional) – Specifies if the control has a drop down button. Defaults to
True.read_only (bool, optional) – Specifies that the content of the control cannot be modified by the user. Defaults to
False.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create combo box control.
- Returns:
Combo box control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.
See also
- insert_currency_field(*, x, y, width, height=20, value=0.0, min_value=-1000000.0, max_value=1000000.0, spin_button=False, increment=1, accuracy=2, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Inserts a currency control.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to20. If-1, the dialog Size is not set.value (float, optional) – Control Value. Defaults to
0.0.min_value (float, optional) – Specifies the smallest value that can be entered in the control. Defaults to
-1000000.0.max_value (float, optional) – Specifies the largest value that can be entered in the control. Defaults to
1000000.0.spin_button (bool, optional) – When
True, a spin button is present. Defaults toFalse.increment (int, optional) – The step when the spin button is pressed. Defaults to
1.accuracy (int, optional) – Specifies the decimal accuracy. Default is
2decimal digits.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.
- Raises:
DialogError – If unable to create currency field box control.
- Returns:
Currency field control.
- Return type:
- Parameters:
x (int | UnitT) –
y (int | UnitT) –
width (int | UnitT) –
height (int | UnitT) –
value (float) –
min_value (float) –
max_value (float) –
spin_button (bool) –
increment (int) –
accuracy (int) –
border (BorderKind) –
name (str) –
dialog_ctrl (XControl | None) –
props (Any) –
- insert_date_field(*, x, y, width, height=20, date_value=None, min_date=datetime.datetime(1900, 1, 1, 0, 0), max_date=datetime.datetime(2200, 12, 31, 0, 0), drop_down=True, date_format=DateFormatKind.SYSTEM_SHORT, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Create a new control of type DateField in the actual dialog.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to20. If-1, the dialog Size is not set.date_value (datetime.datetime | None, optional) – Specifics control datetime. Defaults to
None.min_date (datetime.datetime, optional) – Specifics control min datetime. Defaults to
datetime(1900, 1, 1, 0, 0, 0, 0).max_date (datetime.datetime, optional) – Specifics control Min datetime. Defaults to
datetime(2200, 12, 31, 0, 0, 0, 0).drop_down (bool, optional) – Specifies if the control is a dropdown. Defaults to
True.date_format (DateFormatKind, optional) – Date format. Defaults to
DateFormatKind.SYSTEM_SHORT.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create date field control.
- Returns:
Date field control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.DateFormatKindcan be imported fromooodev.utils.kind.date_format_kind.
- insert_file_control(*, x, y, width, height=20, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Create a new control of type FileControl in the actual dialog.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to20. If-1, the dialog Size is not set.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create file control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.
- insert_fixed_line(*, x, y, width, height=1, orientation=OrientationKind.HORIZONTAL, name='', dialog_ctrl=None, **props)[source]
Create a new control of type Fixed Line in the actual dialog.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to1. If-1, the dialog Size is not set.orientation (OrientationKind, optional) – Orientation. Defaults to
OrientationKind.HORIZONTAL.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create fixed line control.
- Returns:
Fixed Line Control.
- Return type:
Hint
OrientationKindcan be imported fromooodev.utils.kind.orientation_kind.
- insert_formatted_field(*, x, y, width, height=20, value=None, min_value=-1000000.0, max_value=1000000.0, spin_button=False, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Create a new control of type FormattedField in the actual dialog.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to20. If-1, the dialog Size is not set.value (float, optional) – Control Value. Defaults to
0.0.min_value (float, optional) – Specifies the smallest value that can be entered in the control. Defaults to
-1000000.0.max_value (float, optional) – Specifies the largest value that can be entered in the control. Defaults to
1000000.0.spin_button (bool, optional) – When
True, a spin button is present. Defaults toFalse.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create formatted field control.
- Returns:
Formatted Field.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.
- insert_group_box(*, x, y, width, height, label='', name='', dialog_ctrl=None, **props)[source]
Create a new control of type GroupBox in the actual dialog.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. If-1, the dialog Size is not set.label (str, optional) – Group box label.
name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create group box control.
- Returns:
Group box Control.
- Return type:
- insert_hyperlink(*, label, url, x, y, width, height=20, align=AlignKind.LEFT, vert_align=VerticalAlignment.TOP, multiline=False, border=BorderKind.NONE, name='', dialog_ctrl=None, **props)[source]
Create a new control of type Hyperlink in the actual dialog.
- Parameters:
label (str) – Hyperlink label.
url (str) – Hyperlink URL.
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to20. If-1, the dialog Size is not set.align (AlignKind, optional) – Horizontal alignment. Defaults to
AlignKind.LEFT.vert_align (VerticalAlignment, optional) – Vertical alignment. Defaults to
VerticalAlignment.TOP.multiline (bool, optional) – Specifies if the control can display multiple lines of text. Defaults to
False.border (BorderKind, optional) – Border option. Defaults to
BorderKind.NONE.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create Hyperlink control.
- Returns:
Hyperlink Control.
- Return type:
Hint
AlignKindcan be imported fromooodev.utils.kind.align_kind.BorderKindcan be imported fromooodev.utils.kind.border_kind.VerticalAlignmentcan be imported fromooo.dyn.style.vertical_alignment.
- insert_image_control(*, x, y, width, height=20, border=BorderKind.BORDER_3D, scale=ImageScaleModeEnum.NONE, image_url='', name='', dialog_ctrl=None, **props)[source]
Create a new control of type ImageControl in the actual dialog.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, , UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to20. If-1, the dialog Size is not set.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.image_url (PathOrStr, optional) – Image URL. When setting the value it can be a string or a Path object. If a string is passed it can be a URL or a path to a file. Value such as
file:///path/to/image.pngand/path/to/image.pngare valid. Relative paths are supported.scale (int | ImageScaleModeEnum, optional) – Image scale mode. Defaults to
ImageScaleModeEnum.NONE.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create image control.
- Returns:
Image Control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.ImageScaleModeEnumcan be imported fromooo.dyn.awt.image_scale_mode.VerticalAlignmentcan be imported fromooo.dyn.style.vertical_alignment.
- insert_label(*, label, x, y, width, height=20, name='', dialog_ctrl=None, **props)[source]
Insert a Fixed Text into a control.
- Parameters:
label (str) – Contents of label.
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Default20. If-1, the dialog Size is not set.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create Fixed Text.
- Returns:
Fixed Text Control.
- Return type:
See also
- insert_list_box(*, entries, x, y, width, height=100, drop_down=False, read_only=False, line_count=5, multi_select=False, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Insert a list box control.
- Parameters:
entries (Iterable[str]) – List box entries.
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to100. If-1, the dialog Size is not set.drop_down (bool, optional) – Specifies if the control has a drop down button. Defaults to
False.read_only (bool, optional) – Specifies that the content of the control cannot be modified by the user. Defaults to
False.line_count (int, optional) – Specifies the number of lines to display. Defaults to
5.multi_select (int, optional) – Specifies if multiple entries can be selected. Defaults to
False.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create list box control.
- Returns:
List box control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.
- insert_numeric_field(*, x, y, width, height=20, value=None, min_value=-1000000.0, max_value=1000000.0, spin_button=False, increment=1, accuracy=2, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Create a new control of type NumericField in the actual dialog.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Default20. If-1, the dialog Size is not set.value (float, optional) – Control Value. Defaults to
0.0.min_value (float, optional) – Specifies the smallest value that can be entered in the control. Defaults to
-1000000.0.max_value (float, optional) – Specifies the largest value that can be entered in the control. Defaults to
1000000.0.spin_button (bool, optional) – When
True, a spin button is present. Defaults toFalse.increment (int, optional) – The step when the spin button is pressed. Defaults to
1.accuracy (int, optional) – Specifies the decimal accuracy. Default is
2decimal digitsborder (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create numeric field control.
- Returns:
Numeric Field Control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.
- insert_password_field(*, text, x, y, width, height=20, border=BorderKind.NONE, name='', dialog_ctrl=None, **props)[source]
Inserts a password field.
- Parameters:
text (str) – Text value.
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to20. If-1, the dialog Size is not set.border (BorderKind, optional) – Border option. Defaults to
BorderKind.NONE.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create text field.
- Returns:
Text Field Control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.
See also
insert_text_field().
- insert_pattern_field(*, x, y, width, height=20, edit_mask='', literal_mask='', border=BorderKind.BORDER_3D, dialog_ctrl=None, name='', **props)[source]
Create a new control of type PatternField in the actual dialog.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Default``20``. If-1, the dialog Size is not set.edit_mask (str, optional) – Specifies a character code that determines what the user may enter. Defaults to
"".literal_mask (str, optional) – Specifies the initial values that are displayed in the pattern field. Defaults to
"".border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create pattern field control.
- Returns:
Pattern Field Control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.
- insert_progress_bar(*, x, y, width, height, min_value=0, max_value=100, value=0, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Create a new control of type Progress Control in the actual dialog.
- Parameters:
x (int, UnitT) – X coordinate. If
-1, the dialog Position is not set.x – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT) – Height in Pixels or
UnitT. If-1, the dialog Size is not set.min_value (float, optional) – Specifies the smallest value that can be entered in the control. Defaults to
0.max_value (float, optional) – Specifies the largest value that can be entered in the control. Defaults to
100.value (int, optional) – The value initial value of the progress bar. Defaults to
0.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create numeric field control.
- Returns:
Progress Bar Control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.
- insert_radio_button(*, label, x, y, width, height=20, multiline=False, name='', dialog_ctrl=None, **props)[source]
Create a new control of type RadioButton in the actual dialog.
- Parameters:
label (str) – Contents of label.
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Default20. If-1, the dialog Size is not set.multiline (bool, optional) – Specifies if the control can display multiple lines of text. Defaults to
False.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create radio button.
- Returns:
Radio button control.
- Return type:
- insert_scroll_bar(*, x, y, width, height, min_value=0, max_value=100, orientation=OrientationKind.HORIZONTAL, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Create a new control of type ScrollBar in the actual dialog.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT) – Height in Pixels or
UnitT. If-1, the dialog Size is not set.min_value (float, optional) – Specifies the smallest value that can be entered in the control. Defaults to
0.max_value (float, optional) – Specifies the largest value that can be entered in the control. Defaults to
100.orientation (OrientationKind, optional) – Orientation. Defaults to
OrientationKind.HORIZONTAL.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create scroll bar control.
- Returns:
Scroll Bar Control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.OrientationKindcan be imported fromooodev.utils.kind.orientation_kind.
- insert_spin_button(*, x, y, width, height, min_value=0, max_value=100, orientation=OrientationKind.HORIZONTAL, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Create a new control of type SpinButton in the actual dialog.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT) – Height in Pixels or
UnitT. If-1, the dialog Size is not set.min_value (float, optional) – Specifies the smallest value that can be entered in the control. Defaults to
0.max_value (float, optional) – Specifies the largest value that can be entered in the control. Defaults to
100.orientation (OrientationKind, optional) – Orientation. Defaults to
OrientationKind.HORIZONTAL.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create scroll bar control.
- Returns:
Scroll Bar Control.
- Return type:
CtlSpinButton
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.OrientationKindcan be imported fromooodev.utils.kind.orientation_kind.
- insert_tab_control(*, x, y, width, height=1, border=BorderKind.NONE, name='', dialog_ctrl=None)[source]
Create a new control of type tab in the actual dialog.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to1. If-1, the dialog Size is not set.border (BorderKind, optional) – Border option. Defaults to
BorderKind.NONE.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
- Raises:
DialogError – If unable to create tab control.
- Returns:
Tab Control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.
See also
insert_tab_page().
- insert_tab_page(*, tab_ctrl, title, tab_position, name='', dialog_ctrl=None, **props)[source]
Create a new control of type Tab Page in the actual tab control.
- Parameters:
tab_ctrl (CtlTabPageContainer) – Tab Container.
title (str) – Tab title.
tab_position (int) – Tab position.
name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create tab page control.
- Returns:
Tab Page Control.
- Return type:
See also
insert_tab_control().
- insert_table_control(*, x, y, width, height, row_header=True, col_header=True, grid_lines=False, scroll_bars=HorzVertKind.NONE, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Create a new control of type TableControl in the actual dialog.
To add data to the table use
set_table_data().- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT) – Height in Pixels or
UnitT. If-1, the dialog Size is not set.row_header (bool, optional) – Specifies if the control has a row header. Defaults to
True.col_header (bool, optional) – Specifies if the control has a column header. Defaults to
True.grid_lines (bool, optional) – Specifies if the control has grid lines. when True horizontal and vertical lines are painted between the grid cells. Defaults to
False.scroll_bars (HorzVertKind, optional) – Specifies if the control has scroll bars. Scrollbars always appear dynamically when they are needed. Defaults to
HorzVertKind.NONE.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create table control.
- Returns:
Table Control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.HorzVertKindcan be imported fromooodev.utils.kind.horz_ver_kind.
See also
set_table_data().
- insert_text_field(*, x, y, width, height=20, text='', echo_char='', border=BorderKind.NONE, name='', dialog_ctrl=None, **props)[source]
Inserts a text Field.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to20. If-1, the dialog Size is not set.text (str, optional) – Text value.
echo_char (str, optional) – Character used for masking. Must be a single character.
border (BorderKind, optional) – Border option. Defaults to
BorderKind.NONE.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create text field.
- Returns:
Text Field Control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.
See also
- insert_time_field(*, x, y, width, height=20, time_value=None, min_time=datetime.time(0, 0), max_time=datetime.time(23, 59, 59, 999999), time_format=TimeFormatKind.SHORT_24H, spin_button=True, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Create a new control of type TimeField in the actual dialog.
- Parameters:
x (int, UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int, UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int, UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int, UnitT, optional) – Height in Pixels or
UnitT. Defaults to20. If-1, the dialog Size is not set.time_value (datetime.time | None, optional) – Specifics the control time. Defaults to
None.min_time (datetime.time, optional) – Specifics control min time. Defaults to
time(0, 0, 0, 0).max_time (datetime.time, optional) – Specifics control min time. Defaults to a
time(23, 59, 59, 999_999).time_format (TimeFormatKind, optional) – Date format. Defaults to
TimeFormatKind.SHORT_24H.spin_button (bool, optional) – When
True, a spin button is present. Defaults toTrue.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create time field control.
- Returns:
Time field control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.TimeFormatKindcan be imported fromooodev.utils.kind.time_format_kind.
- insert_tree_control(*, x, y, width, height, border=BorderKind.BORDER_3D, name='', dialog_ctrl=None, **props)[source]
Create a new control of type Tree in the actual dialog.
- Parameters:
x (int , UnitT) – X coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.y (int , UnitT) – Y coordinate in Pixels or
UnitT. If-1, the dialog Position is not set.width (int , UnitT) – Width in Pixels or
UnitT. If-1, the dialog Size is not set.height (int , UnitT) – Height in Pixels or
UnitT. If-1, the dialog Size is not set.border (BorderKind, optional) – Border option. Defaults to
BorderKind.BORDER_3D.name (str, optional) – Name of button. Must be a unique name. If empty, a unique name is generated.
dialog_ctrl (XControl, optional) – control. Defaults to class instance.
props (dict, optional) – Extra properties to set for control.
- Raises:
DialogError – If unable to create Tree control.
- Returns:
Tree Control.
- Return type:
Hint
BorderKindcan be imported fromooodev.utils.kind.border_kind.