dhxpyt.form

1from .form import Form
2from .form_config import FormConfig
3from .controls import Avatar, Button, Checkbox, CheckboxGroup, Colorpicker, Combo, Container, Datepicker, Fieldset, Input, RadioGroup, Select, SimpleVault, Slider, Spacer, Text, Textarea, Timepicker, Toggle, ToggleGroup
4from .controls import AvatarConfig, ButtonConfig, CheckboxConfig, CheckboxGroupConfig, ColorpickerConfig, ComboConfig, ContainerConfig, DatepickerConfig, FieldsetConfig, InputConfig, RadioGroupConfig, SelectConfig, SimpleVaultConfig, SliderConfig, SpacerConfig, TextConfig, TextareaConfig, TimepickerConfig, ToggleConfig, ToggleGroupConfig
5
6
7__all__ = ["Form", "FormConfig", "Avatar", "Button", "Checkbox", "CheckboxGroup", "Colorpicker", "Combo", "Container", "Datepicker", "Fieldset", "Input", "RadioGroup", "Select", "SimpleVault", "Slider", "Spacer", "Text", "Textarea", "Timepicker", "Toggle", "ToggleGroup", "AvatarConfig", "ButtonConfig", "CheckboxConfig", "CheckboxGroupConfig", "ColorpickerConfig", "ComboConfig", "ContainerConfig", "DatepickerConfig", "FieldsetConfig", "InputConfig", "RadioGroupConfig", "SelectConfig", "SimpleVaultConfig", "SliderConfig", "SpacerConfig", "TextConfig", "TextareaConfig", "TimepickerConfig", "ToggleConfig", "ToggleGroupConfig"]
class Form:
 14class Form:
 15    def __init__(self, config: FormConfig = None, widget_parent: Any = None):
 16        """Initializes the Form instance."""
 17        if config is None:
 18            config = FormConfig()
 19        config_dict = config.to_dict()
 20        self.form = js.dhx.Form.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ Form API Functions """
 23
 24    def blur(self, name: str = None) -> None:
 25        """Removes focus from a control of the Form."""
 26        self.form.blur(name)
 27
 28    def clear(self, method: str = None) -> None:
 29        """Clears the form."""
 30        self.form.clear(method)
 31
 32    def destructor(self) -> None:
 33        """Removes the Form instance and releases occupied resources."""
 34        self.form.destructor()
 35
 36    def disable(self) -> None:
 37        """Disables the Form."""
 38        self.form.disable()
 39
 40    def enable(self) -> None:
 41        """Enables the Form."""
 42        self.form.enable()
 43
 44    def for_each(self, callback: Callable[[Any, int, List[Any]], Any]) -> None:
 45        """Iterates over all controls of the Form."""
 46        proxy_callback = create_proxy(callback)
 47        self.form.forEach(proxy_callback)
 48
 49    def get_item(self, name: str) -> Any:
 50        """Gives access to the object of a Form control."""
 51        return self.form.getItem(name)
 52
 53    def get_properties(self, name: str = None) -> Union[Dict[str, Any], Dict[str, Dict[str, Any]]]:
 54        """Returns objects with available configuration attributes of Form controls."""
 55        return self.form.getProperties(name)
 56
 57    def get_value(self, as_form_data: bool = False) -> Dict[str, Any]:
 58        """Gets current values/states of controls."""
 59        return self.form.getValue(as_form_data)
 60
 61    def hide(self) -> None:
 62        """Hides the Form."""
 63        self.form.hide()
 64
 65    def is_disabled(self, name: str = None) -> bool:
 66        """Checks whether the Form or a control is disabled."""
 67        return self.form.isDisabled(name)
 68
 69    def is_visible(self, name: str = None) -> bool:
 70        """Checks whether the Form or a control is visible."""
 71        return self.form.isVisible(name)
 72
 73    def paint(self) -> None:
 74        """Repaints the Form on the page."""
 75        self.form.paint()
 76
 77    def send(self, url: str, method: str = "POST", as_form_data: bool = False) -> Any:
 78        """Sends the Form to the server."""
 79        return self.form.send(url, method, as_form_data)
 80
 81    def set_focus(self, name: str) -> None:
 82        """Sets focus to a Form control by its name or id."""
 83        self.form.setFocus(name)
 84
 85    def set_properties(self, arg: Union[str, Dict[str, Dict[str, Any]]], properties: Dict[str, Any] = None) -> None:
 86        """Allows changing available configuration attributes of Form controls dynamically."""
 87        if isinstance(arg, str):
 88            self.form.setProperties(arg, js.JSON.parse(json.dumps(properties)))
 89        elif isinstance(arg, dict):
 90            props = {k: js.JSON.parse(json.dumps(v)) for k, v in arg.items()}
 91            self.form.setProperties(props)
 92        else:
 93            raise TypeError("Argument must be a string or a dictionary")
 94
 95    def set_value(self, obj: Dict[str, Any]) -> None:
 96        """Sets values/states for controls."""
 97        self.form.setValue(js.JSON.parse(json.dumps(obj)))
 98
 99    def show(self) -> None:
100        """Shows the Form on the page."""
101        self.form.show()
102
103    def validate(self, silent: bool = False) -> bool:
104        """Validates form fields."""
105        return self.form.validate(silent)
106
107    """ Form Events """
108
109    def add_event_handler(self, event_name: str, handler: Callable) -> None:
110        """Helper to add event handlers dynamically."""
111        event_proxy = create_proxy(handler)
112        self.form.events.on(event_name, event_proxy)
113
114    def on_after_change_properties(self, handler: Callable[[str, Dict[str, Any]], None]) -> None:
115        """Fires after configuration attributes of a Form control have been changed dynamically."""
116        self.add_event_handler('afterChangeProperties', handler)
117
118    def on_after_hide(self, handler: Callable[[str, Any, str], None]) -> None:
119        """Fires after a Form control or its element is hidden."""
120        self.add_event_handler('afterHide', handler)
121
122    def on_after_send(self, handler: Callable[[], None]) -> None:
123        """Fires after a form is sent to the server."""
124        self.add_event_handler('afterSend', handler)
125
126    def on_after_show(self, handler: Callable[[str, Any, str], None]) -> None:
127        """Fires after a Form control or its element is shown."""
128        self.add_event_handler('afterShow', handler)
129
130    def on_after_validate(self, handler: Callable[[str, Any, bool], None]) -> None:
131        """Fires after validation of form fields is finished."""
132        self.add_event_handler('afterValidate', handler)
133
134    def on_before_change(self, handler: Callable[[str, Any], Union[bool, None]]) -> None:
135        """Fires before changing the value of a control."""
136        def event_handler(name, value):
137            result = handler(name, value)
138            if result is False:
139                return js.Boolean(False)
140        self.form.events.on('beforeChange', create_proxy(event_handler))
141
142    def on_before_change_properties(self, handler: Callable[[str, Dict[str, Any]], Union[bool, None]]) -> None:
143        """Fires before configuration attributes of a Form control are changed dynamically."""
144        def event_handler(name, properties):
145            result = handler(name, properties)
146            if result is False:
147                return js.Boolean(False)
148        self.form.events.on('beforeChangeProperties', create_proxy(event_handler))
149
150    def on_before_hide(self, handler: Callable[[Union[str, int], Any, str], Union[bool, None]]) -> None:
151        """Fires before a Form control or its element is hidden."""
152        def event_handler(name, value=None, id=None):
153            result = handler(name, value, id)
154            if result is False:
155                return js.Boolean(False)
156        self.form.events.on('beforeHide', create_proxy(event_handler))
157
158    def on_before_send(self, handler: Callable[[], Union[bool, None]]) -> None:
159        """Fires before a form is sent to the server."""
160        def event_handler():
161            result = handler()
162            if result is False:
163                return js.Boolean(False)
164        self.form.events.on('beforeSend', create_proxy(event_handler))
165
166    def on_before_show(self, handler: Callable[[str, Any, str], Union[bool, None]]) -> None:
167        """Fires before a Form control or its element is shown."""
168        def event_handler(name, value=None, id=None):
169            result = handler(name, value, id)
170            if result is False:
171                return js.Boolean(False)
172        self.form.events.on('beforeShow', create_proxy(event_handler))
173
174    def on_before_validate(self, handler: Callable[[str, Any], Union[bool, None]]) -> None:
175        """Fires before validation of form fields has started."""
176        def event_handler(name, value):
177            result = handler(name, value)
178            if result is False:
179                return js.Boolean(False)
180        self.form.events.on('beforeValidate', create_proxy(event_handler))
181
182    def on_blur(self, handler: Callable[[str, Any, str], None]) -> None:
183        """Fires when a control of Form has lost focus."""
184        self.add_event_handler('blur', handler)
185
186    def on_change(self, handler: Callable[[str, Any], None]) -> None:
187        """Fires on changing the value of a control."""
188        self.add_event_handler('change', handler)
189
190    def on_click(self, handler: Callable[[str, Any], Any]) -> None:
191        """Fires after a click on a button in a form."""
192        self.add_event_handler('click', handler)
193
194    def on_focus(self, handler: Callable[[str, Any, str], None]) -> None:
195        """Fires when a control of Form has received focus."""
196        self.add_event_handler('focus', handler)
197
198    def on_keydown(self, handler: Callable[[Any, str, str], None]) -> None:
199        """Fires when any key is pressed."""
200        self.add_event_handler('keydown', handler)
201
202    """ Form Properties """
203
204    @property
205    def align(self) -> str:
206        """Gets or sets the alignment of controls inside the control group."""
207        return self.form.config.align
208
209    @align.setter
210    def align(self, value: str) -> None:
211        self.form.config.align = value
212
213    @property
214    def cols(self) -> List[Dict[str, Any]]:
215        """Gets or sets the columns of controls inside the control group."""
216        return self.form.config.cols
217
218    @cols.setter
219    def cols(self, value: List[Dict[str, Any]]) -> None:
220        self.form.config.cols = value
221
222    @property
223    def css(self) -> str:
224        """Gets or sets the CSS classes applied to the control group."""
225        return self.form.config.css
226
227    @css.setter
228    def css(self, value: str) -> None:
229        self.form.config.css = value
230
231    @property
232    def disabled(self) -> bool:
233        """Gets or sets whether the Form is disabled."""
234        return self.form.config.disabled
235
236    @disabled.setter
237    def disabled(self, value: bool) -> None:
238        self.form.config.disabled = value
239
240    @property
241    def height(self) -> Union[str, int]:
242        """Gets or sets the height of the control group."""
243        return self.form.config.height
244
245    @height.setter
246    def height(self, value: Union[str, int, str]) -> None:
247        self.form.config.height = value
248
249    @property
250    def hidden(self) -> bool:
251        """Gets or sets whether the Form is hidden."""
252        return self.form.config.hidden
253
254    @hidden.setter
255    def hidden(self, value: bool) -> None:
256        self.form.config.hidden = value
257
258    @property
259    def padding(self) -> Union[str, int]:
260        """Gets or sets the padding for content inside the control group."""
261        return self.form.config.padding
262
263    @padding.setter
264    def padding(self, value: Union[str, int]) -> None:
265        self.form.config.padding = value
266
267    @property
268    def rows(self) -> List[Dict[str, Any]]:
269        """Gets or sets the rows of controls inside the control group."""
270        return self.form.config.rows
271
272    @rows.setter
273    def rows(self, value: List[Dict[str, Any]]) -> None:
274        self.form.config.rows = value
275
276    @property
277    def title(self) -> str:
278        """Gets or sets the title of the control group."""
279        return self.form.config.title
280
281    @title.setter
282    def title(self, value: str) -> None:
283        self.form.config.title = value
284
285    @property
286    def width(self) -> Union[str, int]:
287        """Gets or sets the width of the control group."""
288        return self.form.config.width
289
290    @width.setter
291    def width(self, value: Union[str, int, str]) -> None:
292        self.form.config.width = value
Form( config: FormConfig = None, widget_parent: Any = None)
15    def __init__(self, config: FormConfig = None, widget_parent: Any = None):
16        """Initializes the Form instance."""
17        if config is None:
18            config = FormConfig()
19        config_dict = config.to_dict()
20        self.form = js.dhx.Form.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Form instance.

form

Form API Functions

def blur(self, name: str = None) -> None:
24    def blur(self, name: str = None) -> None:
25        """Removes focus from a control of the Form."""
26        self.form.blur(name)

Removes focus from a control of the Form.

def clear(self, method: str = None) -> None:
28    def clear(self, method: str = None) -> None:
29        """Clears the form."""
30        self.form.clear(method)

Clears the form.

def destructor(self) -> None:
32    def destructor(self) -> None:
33        """Removes the Form instance and releases occupied resources."""
34        self.form.destructor()

Removes the Form instance and releases occupied resources.

def disable(self) -> None:
36    def disable(self) -> None:
37        """Disables the Form."""
38        self.form.disable()

Disables the Form.

def enable(self) -> None:
40    def enable(self) -> None:
41        """Enables the Form."""
42        self.form.enable()

Enables the Form.

def for_each(self, callback: Callable[[Any, int, List[Any]], Any]) -> None:
44    def for_each(self, callback: Callable[[Any, int, List[Any]], Any]) -> None:
45        """Iterates over all controls of the Form."""
46        proxy_callback = create_proxy(callback)
47        self.form.forEach(proxy_callback)

Iterates over all controls of the Form.

def get_item(self, name: str) -> Any:
49    def get_item(self, name: str) -> Any:
50        """Gives access to the object of a Form control."""
51        return self.form.getItem(name)

Gives access to the object of a Form control.

def get_properties( self, name: str = None) -> Union[Dict[str, Any], Dict[str, Dict[str, Any]]]:
53    def get_properties(self, name: str = None) -> Union[Dict[str, Any], Dict[str, Dict[str, Any]]]:
54        """Returns objects with available configuration attributes of Form controls."""
55        return self.form.getProperties(name)

Returns objects with available configuration attributes of Form controls.

def get_value(self, as_form_data: bool = False) -> Dict[str, Any]:
57    def get_value(self, as_form_data: bool = False) -> Dict[str, Any]:
58        """Gets current values/states of controls."""
59        return self.form.getValue(as_form_data)

Gets current values/states of controls.

def hide(self) -> None:
61    def hide(self) -> None:
62        """Hides the Form."""
63        self.form.hide()

Hides the Form.

def is_disabled(self, name: str = None) -> bool:
65    def is_disabled(self, name: str = None) -> bool:
66        """Checks whether the Form or a control is disabled."""
67        return self.form.isDisabled(name)

Checks whether the Form or a control is disabled.

def is_visible(self, name: str = None) -> bool:
69    def is_visible(self, name: str = None) -> bool:
70        """Checks whether the Form or a control is visible."""
71        return self.form.isVisible(name)

Checks whether the Form or a control is visible.

def paint(self) -> None:
73    def paint(self) -> None:
74        """Repaints the Form on the page."""
75        self.form.paint()

Repaints the Form on the page.

def send(self, url: str, method: str = 'POST', as_form_data: bool = False) -> Any:
77    def send(self, url: str, method: str = "POST", as_form_data: bool = False) -> Any:
78        """Sends the Form to the server."""
79        return self.form.send(url, method, as_form_data)

Sends the Form to the server.

def set_focus(self, name: str) -> None:
81    def set_focus(self, name: str) -> None:
82        """Sets focus to a Form control by its name or id."""
83        self.form.setFocus(name)

Sets focus to a Form control by its name or id.

def set_properties( self, arg: Union[str, Dict[str, Dict[str, Any]]], properties: Dict[str, Any] = None) -> None:
85    def set_properties(self, arg: Union[str, Dict[str, Dict[str, Any]]], properties: Dict[str, Any] = None) -> None:
86        """Allows changing available configuration attributes of Form controls dynamically."""
87        if isinstance(arg, str):
88            self.form.setProperties(arg, js.JSON.parse(json.dumps(properties)))
89        elif isinstance(arg, dict):
90            props = {k: js.JSON.parse(json.dumps(v)) for k, v in arg.items()}
91            self.form.setProperties(props)
92        else:
93            raise TypeError("Argument must be a string or a dictionary")

Allows changing available configuration attributes of Form controls dynamically.

def set_value(self, obj: Dict[str, Any]) -> None:
95    def set_value(self, obj: Dict[str, Any]) -> None:
96        """Sets values/states for controls."""
97        self.form.setValue(js.JSON.parse(json.dumps(obj)))

Sets values/states for controls.

def show(self) -> None:
 99    def show(self) -> None:
100        """Shows the Form on the page."""
101        self.form.show()

Shows the Form on the page.

def validate(self, silent: bool = False) -> bool:
103    def validate(self, silent: bool = False) -> bool:
104        """Validates form fields."""
105        return self.form.validate(silent)

Validates form fields.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
109    def add_event_handler(self, event_name: str, handler: Callable) -> None:
110        """Helper to add event handlers dynamically."""
111        event_proxy = create_proxy(handler)
112        self.form.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[str, Dict[str, Any]], NoneType]) -> None:
114    def on_after_change_properties(self, handler: Callable[[str, Dict[str, Any]], None]) -> None:
115        """Fires after configuration attributes of a Form control have been changed dynamically."""
116        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes of a Form control have been changed dynamically.

def on_after_hide(self, handler: Callable[[str, Any, str], NoneType]) -> None:
118    def on_after_hide(self, handler: Callable[[str, Any, str], None]) -> None:
119        """Fires after a Form control or its element is hidden."""
120        self.add_event_handler('afterHide', handler)

Fires after a Form control or its element is hidden.

def on_after_send(self, handler: Callable[[], NoneType]) -> None:
122    def on_after_send(self, handler: Callable[[], None]) -> None:
123        """Fires after a form is sent to the server."""
124        self.add_event_handler('afterSend', handler)

Fires after a form is sent to the server.

def on_after_show(self, handler: Callable[[str, Any, str], NoneType]) -> None:
126    def on_after_show(self, handler: Callable[[str, Any, str], None]) -> None:
127        """Fires after a Form control or its element is shown."""
128        self.add_event_handler('afterShow', handler)

Fires after a Form control or its element is shown.

def on_after_validate(self, handler: Callable[[str, Any, bool], NoneType]) -> None:
130    def on_after_validate(self, handler: Callable[[str, Any, bool], None]) -> None:
131        """Fires after validation of form fields is finished."""
132        self.add_event_handler('afterValidate', handler)

Fires after validation of form fields is finished.

def on_before_change(self, handler: Callable[[str, Any], Optional[bool]]) -> None:
134    def on_before_change(self, handler: Callable[[str, Any], Union[bool, None]]) -> None:
135        """Fires before changing the value of a control."""
136        def event_handler(name, value):
137            result = handler(name, value)
138            if result is False:
139                return js.Boolean(False)
140        self.form.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of a control.

def on_before_change_properties(self, handler: Callable[[str, Dict[str, Any]], Optional[bool]]) -> None:
142    def on_before_change_properties(self, handler: Callable[[str, Dict[str, Any]], Union[bool, None]]) -> None:
143        """Fires before configuration attributes of a Form control are changed dynamically."""
144        def event_handler(name, properties):
145            result = handler(name, properties)
146            if result is False:
147                return js.Boolean(False)
148        self.form.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes of a Form control are changed dynamically.

def on_before_hide( self, handler: Callable[[Union[str, int], Any, str], Optional[bool]]) -> None:
150    def on_before_hide(self, handler: Callable[[Union[str, int], Any, str], Union[bool, None]]) -> None:
151        """Fires before a Form control or its element is hidden."""
152        def event_handler(name, value=None, id=None):
153            result = handler(name, value, id)
154            if result is False:
155                return js.Boolean(False)
156        self.form.events.on('beforeHide', create_proxy(event_handler))

Fires before a Form control or its element is hidden.

def on_before_send(self, handler: Callable[[], Optional[bool]]) -> None:
158    def on_before_send(self, handler: Callable[[], Union[bool, None]]) -> None:
159        """Fires before a form is sent to the server."""
160        def event_handler():
161            result = handler()
162            if result is False:
163                return js.Boolean(False)
164        self.form.events.on('beforeSend', create_proxy(event_handler))

Fires before a form is sent to the server.

def on_before_show(self, handler: Callable[[str, Any, str], Optional[bool]]) -> None:
166    def on_before_show(self, handler: Callable[[str, Any, str], Union[bool, None]]) -> None:
167        """Fires before a Form control or its element is shown."""
168        def event_handler(name, value=None, id=None):
169            result = handler(name, value, id)
170            if result is False:
171                return js.Boolean(False)
172        self.form.events.on('beforeShow', create_proxy(event_handler))

Fires before a Form control or its element is shown.

def on_before_validate(self, handler: Callable[[str, Any], Optional[bool]]) -> None:
174    def on_before_validate(self, handler: Callable[[str, Any], Union[bool, None]]) -> None:
175        """Fires before validation of form fields has started."""
176        def event_handler(name, value):
177            result = handler(name, value)
178            if result is False:
179                return js.Boolean(False)
180        self.form.events.on('beforeValidate', create_proxy(event_handler))

Fires before validation of form fields has started.

def on_blur(self, handler: Callable[[str, Any, str], NoneType]) -> None:
182    def on_blur(self, handler: Callable[[str, Any, str], None]) -> None:
183        """Fires when a control of Form has lost focus."""
184        self.add_event_handler('blur', handler)

Fires when a control of Form has lost focus.

def on_change(self, handler: Callable[[str, Any], NoneType]) -> None:
186    def on_change(self, handler: Callable[[str, Any], None]) -> None:
187        """Fires on changing the value of a control."""
188        self.add_event_handler('change', handler)

Fires on changing the value of a control.

def on_click(self, handler: Callable[[str, Any], Any]) -> None:
190    def on_click(self, handler: Callable[[str, Any], Any]) -> None:
191        """Fires after a click on a button in a form."""
192        self.add_event_handler('click', handler)

Fires after a click on a button in a form.

def on_focus(self, handler: Callable[[str, Any, str], NoneType]) -> None:
194    def on_focus(self, handler: Callable[[str, Any, str], None]) -> None:
195        """Fires when a control of Form has received focus."""
196        self.add_event_handler('focus', handler)

Fires when a control of Form has received focus.

def on_keydown(self, handler: Callable[[Any, str, str], NoneType]) -> None:
198    def on_keydown(self, handler: Callable[[Any, str, str], None]) -> None:
199        """Fires when any key is pressed."""
200        self.add_event_handler('keydown', handler)

Fires when any key is pressed.

align: str
204    @property
205    def align(self) -> str:
206        """Gets or sets the alignment of controls inside the control group."""
207        return self.form.config.align

Gets or sets the alignment of controls inside the control group.

cols: List[Dict[str, Any]]
213    @property
214    def cols(self) -> List[Dict[str, Any]]:
215        """Gets or sets the columns of controls inside the control group."""
216        return self.form.config.cols

Gets or sets the columns of controls inside the control group.

css: str
222    @property
223    def css(self) -> str:
224        """Gets or sets the CSS classes applied to the control group."""
225        return self.form.config.css

Gets or sets the CSS classes applied to the control group.

disabled: bool
231    @property
232    def disabled(self) -> bool:
233        """Gets or sets whether the Form is disabled."""
234        return self.form.config.disabled

Gets or sets whether the Form is disabled.

height: Union[str, int]
240    @property
241    def height(self) -> Union[str, int]:
242        """Gets or sets the height of the control group."""
243        return self.form.config.height

Gets or sets the height of the control group.

hidden: bool
249    @property
250    def hidden(self) -> bool:
251        """Gets or sets whether the Form is hidden."""
252        return self.form.config.hidden

Gets or sets whether the Form is hidden.

padding: Union[str, int]
258    @property
259    def padding(self) -> Union[str, int]:
260        """Gets or sets the padding for content inside the control group."""
261        return self.form.config.padding

Gets or sets the padding for content inside the control group.

rows: List[Dict[str, Any]]
267    @property
268    def rows(self) -> List[Dict[str, Any]]:
269        """Gets or sets the rows of controls inside the control group."""
270        return self.form.config.rows

Gets or sets the rows of controls inside the control group.

title: str
276    @property
277    def title(self) -> str:
278        """Gets or sets the title of the control group."""
279        return self.form.config.title

Gets or sets the title of the control group.

width: Union[str, int]
285    @property
286    def width(self) -> Union[str, int]:
287        """Gets or sets the width of the control group."""
288        return self.form.config.width

Gets or sets the width of the control group.

class FormConfig:
15class FormConfig:
16    """
17    Configuration class for Form.
18    """
19    def __init__(self,
20                 align: str = "start",
21                 cols: List[Dict[str, Any]] = None,
22                 css: str = None,
23                 disabled: bool = False,
24                 height: Union[str, int] = "content",
25                 hidden: bool = False,
26                 padding: Union[str, int] = None,
27                 rows: List[Dict[str, Any]] = None,
28                 title: str = None,
29                 width: Union[str, int] = "content"):
30        """
31        :param align: (Optional) Sets the alignment of controls inside the control group.
32        :param cols: (Optional) Arranges controls inside the control group horizontally.
33        :param css: (Optional) The name of a CSS class(es) applied to the control group.
34        :param disabled: (Optional) Makes a form disabled.
35        :param height: (Optional) Sets the height of the control group.
36        :param hidden: (Optional) Defines whether a form is hidden.
37        :param padding: (Optional) Sets padding for content inside the control group.
38        :param rows: (Optional) Arranges controls inside the control group vertically.
39        :param title: (Optional) Specifies the title of the control group.
40        :param width: (Optional) Sets the width of the control group.
41        """
42        self.align = align
43        self.cols = cols if cols else []
44        self.css = css
45        self.disabled = disabled
46        self.height = height
47        self.hidden = hidden
48        self.padding = padding
49        self.rows = rows if rows else []
50        self.title = title
51        self.width = width
52
53    def to_dict(self) -> Dict[str, Any]:
54        """
55        Converts the FormConfig into a dictionary format that can be
56        passed into the form constructor.
57        """
58        config_dict = {
59            'align': self.align,
60            'cols': self.cols,
61            'css': self.css,
62            'disabled': self.disabled,
63            'height': self.height,
64            'hidden': self.hidden,
65            'padding': self.padding,
66            'rows': self.rows,
67            'title': self.title,
68            'width': self.width
69        }
70
71        if 'cols' in config_dict:
72            config_dict['cols'] = [process_item(col) for col in config_dict['cols']]
73        if 'rows' in config_dict:
74            config_dict['rows'] = [process_item(row) for row in config_dict['rows']]
75
76            
77        # Remove None values
78        return {k: v for k, v in config_dict.items() if v is not None}

Configuration class for Form.

FormConfig( align: str = 'start', cols: List[Dict[str, Any]] = None, css: str = None, disabled: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = None, rows: List[Dict[str, Any]] = None, title: str = None, width: Union[str, int] = 'content')
19    def __init__(self,
20                 align: str = "start",
21                 cols: List[Dict[str, Any]] = None,
22                 css: str = None,
23                 disabled: bool = False,
24                 height: Union[str, int] = "content",
25                 hidden: bool = False,
26                 padding: Union[str, int] = None,
27                 rows: List[Dict[str, Any]] = None,
28                 title: str = None,
29                 width: Union[str, int] = "content"):
30        """
31        :param align: (Optional) Sets the alignment of controls inside the control group.
32        :param cols: (Optional) Arranges controls inside the control group horizontally.
33        :param css: (Optional) The name of a CSS class(es) applied to the control group.
34        :param disabled: (Optional) Makes a form disabled.
35        :param height: (Optional) Sets the height of the control group.
36        :param hidden: (Optional) Defines whether a form is hidden.
37        :param padding: (Optional) Sets padding for content inside the control group.
38        :param rows: (Optional) Arranges controls inside the control group vertically.
39        :param title: (Optional) Specifies the title of the control group.
40        :param width: (Optional) Sets the width of the control group.
41        """
42        self.align = align
43        self.cols = cols if cols else []
44        self.css = css
45        self.disabled = disabled
46        self.height = height
47        self.hidden = hidden
48        self.padding = padding
49        self.rows = rows if rows else []
50        self.title = title
51        self.width = width
Parameters
  • align: (Optional) Sets the alignment of controls inside the control group.
  • cols: (Optional) Arranges controls inside the control group horizontally.
  • css: (Optional) The name of a CSS class(es) applied to the control group.
  • disabled: (Optional) Makes a form disabled.
  • height: (Optional) Sets the height of the control group.
  • hidden: (Optional) Defines whether a form is hidden.
  • padding: (Optional) Sets padding for content inside the control group.
  • rows: (Optional) Arranges controls inside the control group vertically.
  • title: (Optional) Specifies the title of the control group.
  • width: (Optional) Sets the width of the control group.
align
cols
css
disabled
height
hidden
padding
rows
title
width
def to_dict(self) -> Dict[str, Any]:
53    def to_dict(self) -> Dict[str, Any]:
54        """
55        Converts the FormConfig into a dictionary format that can be
56        passed into the form constructor.
57        """
58        config_dict = {
59            'align': self.align,
60            'cols': self.cols,
61            'css': self.css,
62            'disabled': self.disabled,
63            'height': self.height,
64            'hidden': self.hidden,
65            'padding': self.padding,
66            'rows': self.rows,
67            'title': self.title,
68            'width': self.width
69        }
70
71        if 'cols' in config_dict:
72            config_dict['cols'] = [process_item(col) for col in config_dict['cols']]
73        if 'rows' in config_dict:
74            config_dict['rows'] = [process_item(row) for row in config_dict['rows']]
75
76            
77        # Remove None values
78        return {k: v for k, v in config_dict.items() if v is not None}

Converts the FormConfig into a dictionary format that can be passed into the form constructor.

class Avatar:
 14class Avatar:
 15    def __init__(self, config: AvatarConfig = None, widget_parent: Any = None):
 16        """Initializes the Avatar control."""
 17        if config is None:
 18            config = AvatarConfig()
 19        config_dict = config.to_dict()
 20        self.avatar = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ Avatar API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from the control."""
 26        self.avatar.blur()
 27
 28    def clear(self) -> None:
 29        """Clears the value of the Avatar control."""
 30        self.avatar.clear()
 31
 32    def clear_validate(self) -> None:
 33        """Clears validation of the Avatar control."""
 34        self.avatar.clearValidate()
 35
 36    def destructor(self) -> None:
 37        """Removes the Avatar instance and releases the occupied resources."""
 38        self.avatar.destructor()
 39
 40    def disable(self) -> None:
 41        """Disables the Avatar control."""
 42        self.avatar.disable()
 43
 44    def enable(self) -> None:
 45        """Enables the Avatar control."""
 46        self.avatar.enable()
 47
 48    def focus(self) -> None:
 49        """Sets focus to the control."""
 50        self.avatar.focus()
 51
 52    def get_properties(self) -> Dict[str, Any]:
 53        """Returns an object with the available configuration attributes of the control."""
 54        return self.avatar.getProperties().to_py()
 55
 56    def get_value(self) -> Dict[str, Any]:
 57        """Returns the current value of the Avatar control."""
 58        return self.avatar.getValue().to_py()
 59
 60    def hide(self) -> None:
 61        """Hides the Avatar control."""
 62        self.avatar.hide()
 63
 64    def is_disabled(self) -> bool:
 65        """Checks whether the Avatar control is disabled."""
 66        return self.avatar.isDisabled()
 67
 68    def is_visible(self) -> bool:
 69        """Checks whether the Avatar control is visible on the page."""
 70        return self.avatar.isVisible()
 71
 72    def select_file(self) -> None:
 73        """Opens the dialog for selecting an image."""
 74        self.avatar.selectFile()
 75
 76    def send(self, params: Dict[str, Any] = None) -> None:
 77        """Sends a POST request for a file upload to a server-side URL."""
 78        self.avatar.send(js.JSON.parse(json.dumps(params or {})))
 79
 80    def set_properties(self, properties: Dict[str, Any]) -> None:
 81        """Allows changing available configuration attributes of the control dynamically."""
 82        self.avatar.setProperties(js.JSON.parse(json.dumps(properties)))
 83
 84    def set_value(self, value: Dict[str, Any]) -> None:
 85        """Sets the value for the Avatar control."""
 86        self.avatar.setValue(js.JSON.parse(json.dumps(value)))
 87
 88    def show(self) -> None:
 89        """Shows the Avatar control on the page."""
 90        self.avatar.show()
 91
 92    def validate(self, silent: bool = False, validate_value: Dict[str, Any] = None) -> bool:
 93        """Validates the Avatar control."""
 94        return self.avatar.validate(silent, js.JSON.parse(json.dumps(validate_value or {})))
 95
 96    """ Avatar Events """
 97
 98    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 99        """Helper to add event handlers dynamically."""
100        event_proxy = create_proxy(handler)
101        self.avatar.events.on(event_name, event_proxy)
102
103    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
104        """Fires after configuration attributes have been changed dynamically."""
105        self.add_event_handler('afterChangeProperties', handler)
106
107    def on_after_hide(self, handler: Callable[[Dict[str, Any], bool], None]) -> None:
108        """Fires after the control is hidden."""
109        self.add_event_handler('afterHide', handler)
110
111    def on_after_show(self, handler: Callable[[Dict[str, Any]], None]) -> None:
112        """Fires after the control is shown."""
113        self.add_event_handler('afterShow', handler)
114
115    def on_after_validate(self, handler: Callable[[Dict[str, Any], bool], None]) -> None:
116        """Fires after the control value is validated."""
117        self.add_event_handler('afterValidate', handler)
118
119    def on_before_change(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
120        """Fires before changing the value of the control."""
121        def event_handler(value):
122            result = handler(value.to_py())
123            if result is False:
124                return js.Boolean(False)
125        self.avatar.events.on('beforeChange', create_proxy(event_handler))
126
127    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
128        """Fires before configuration attributes are changed dynamically."""
129        def event_handler(properties):
130            result = handler(properties.to_py())
131            if result is False:
132                return js.Boolean(False)
133        self.avatar.events.on('beforeChangeProperties', create_proxy(event_handler))
134
135    def on_before_hide(self, handler: Callable[[Dict[str, Any], bool], Union[bool, None]]) -> None:
136        """Fires before the control is hidden."""
137        def event_handler(value, init):
138            result = handler(value.to_py(), init)
139            if result is False:
140                return js.Boolean(False)
141        self.avatar.events.on('beforeHide', create_proxy(event_handler))
142
143    def on_before_show(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
144        """Fires before the control is shown."""
145        def event_handler(value):
146            result = handler(value.to_py())
147            if result is False:
148                return js.Boolean(False)
149        self.avatar.events.on('beforeShow', create_proxy(event_handler))
150
151    def on_before_upload_file(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
152        """Fires before file upload begins."""
153        def event_handler(value):
154            result = handler(value.to_py())
155            if result is False:
156                return js.Boolean(False)
157        self.avatar.events.on('beforeUploadFile', create_proxy(event_handler))
158
159    def on_before_validate(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
160        """Fires before the control value is validated."""
161        def event_handler(value):
162            result = handler(value.to_py())
163            if result is False:
164                return js.Boolean(False)
165        self.avatar.events.on('beforeValidate', create_proxy(event_handler))
166
167    def on_blur(self, handler: Callable[[Dict[str, Any]], None]) -> None:
168        """Fires when the control has lost focus."""
169        self.add_event_handler('blur', handler)
170
171    def on_change(self, handler: Callable[[Dict[str, Any]], None]) -> None:
172        """Fires on changing the value of the control."""
173        self.add_event_handler('change', handler)
174
175    def on_focus(self, handler: Callable[[Dict[str, Any]], None]) -> None:
176        """Fires when the control has received focus."""
177        self.add_event_handler('focus', handler)
178
179    def on_keydown(self, handler: Callable[[Any], None]) -> None:
180        """Fires when any key is pressed and the control is in focus."""
181        self.add_event_handler('keydown', handler)
182
183    def on_upload_begin(self, handler: Callable[[Dict[str, Any]], None]) -> None:
184        """Fires when file upload begins."""
185        self.add_event_handler('uploadBegin', handler)
186
187    def on_upload_complete(self, handler: Callable[[Dict[str, Any]], None]) -> None:
188        """Fires when upload is completed."""
189        self.add_event_handler('uploadComplete', handler)
190
191    def on_upload_fail(self, handler: Callable[[Dict[str, Any]], None]) -> None:
192        """Fires if the file upload failed."""
193        self.add_event_handler('uploadFail', handler)
194
195    def on_upload_file(self, handler: Callable[[Dict[str, Any], Dict[str, Any]], None]) -> None:
196        """Fires when a file has been uploaded."""
197        self.add_event_handler('uploadFile', handler)
198
199    def on_upload_progress(self, handler: Callable[[int, Dict[str, Any]], None]) -> None:
200        """Fires on each percent of a file uploading."""
201        self.add_event_handler('uploadProgress', handler)
Avatar( config: AvatarConfig = None, widget_parent: Any = None)
15    def __init__(self, config: AvatarConfig = None, widget_parent: Any = None):
16        """Initializes the Avatar control."""
17        if config is None:
18            config = AvatarConfig()
19        config_dict = config.to_dict()
20        self.avatar = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Avatar control.

avatar

Avatar API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from the control."""
26        self.avatar.blur()

Removes focus from the control.

def clear(self) -> None:
28    def clear(self) -> None:
29        """Clears the value of the Avatar control."""
30        self.avatar.clear()

Clears the value of the Avatar control.

def clear_validate(self) -> None:
32    def clear_validate(self) -> None:
33        """Clears validation of the Avatar control."""
34        self.avatar.clearValidate()

Clears validation of the Avatar control.

def destructor(self) -> None:
36    def destructor(self) -> None:
37        """Removes the Avatar instance and releases the occupied resources."""
38        self.avatar.destructor()

Removes the Avatar instance and releases the occupied resources.

def disable(self) -> None:
40    def disable(self) -> None:
41        """Disables the Avatar control."""
42        self.avatar.disable()

Disables the Avatar control.

def enable(self) -> None:
44    def enable(self) -> None:
45        """Enables the Avatar control."""
46        self.avatar.enable()

Enables the Avatar control.

def focus(self) -> None:
48    def focus(self) -> None:
49        """Sets focus to the control."""
50        self.avatar.focus()

Sets focus to the control.

def get_properties(self) -> Dict[str, Any]:
52    def get_properties(self) -> Dict[str, Any]:
53        """Returns an object with the available configuration attributes of the control."""
54        return self.avatar.getProperties().to_py()

Returns an object with the available configuration attributes of the control.

def get_value(self) -> Dict[str, Any]:
56    def get_value(self) -> Dict[str, Any]:
57        """Returns the current value of the Avatar control."""
58        return self.avatar.getValue().to_py()

Returns the current value of the Avatar control.

def hide(self) -> None:
60    def hide(self) -> None:
61        """Hides the Avatar control."""
62        self.avatar.hide()

Hides the Avatar control.

def is_disabled(self) -> bool:
64    def is_disabled(self) -> bool:
65        """Checks whether the Avatar control is disabled."""
66        return self.avatar.isDisabled()

Checks whether the Avatar control is disabled.

def is_visible(self) -> bool:
68    def is_visible(self) -> bool:
69        """Checks whether the Avatar control is visible on the page."""
70        return self.avatar.isVisible()

Checks whether the Avatar control is visible on the page.

def select_file(self) -> None:
72    def select_file(self) -> None:
73        """Opens the dialog for selecting an image."""
74        self.avatar.selectFile()

Opens the dialog for selecting an image.

def send(self, params: Dict[str, Any] = None) -> None:
76    def send(self, params: Dict[str, Any] = None) -> None:
77        """Sends a POST request for a file upload to a server-side URL."""
78        self.avatar.send(js.JSON.parse(json.dumps(params or {})))

Sends a POST request for a file upload to a server-side URL.

def set_properties(self, properties: Dict[str, Any]) -> None:
80    def set_properties(self, properties: Dict[str, Any]) -> None:
81        """Allows changing available configuration attributes of the control dynamically."""
82        self.avatar.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing available configuration attributes of the control dynamically.

def set_value(self, value: Dict[str, Any]) -> None:
84    def set_value(self, value: Dict[str, Any]) -> None:
85        """Sets the value for the Avatar control."""
86        self.avatar.setValue(js.JSON.parse(json.dumps(value)))

Sets the value for the Avatar control.

def show(self) -> None:
88    def show(self) -> None:
89        """Shows the Avatar control on the page."""
90        self.avatar.show()

Shows the Avatar control on the page.

def validate( self, silent: bool = False, validate_value: Dict[str, Any] = None) -> bool:
92    def validate(self, silent: bool = False, validate_value: Dict[str, Any] = None) -> bool:
93        """Validates the Avatar control."""
94        return self.avatar.validate(silent, js.JSON.parse(json.dumps(validate_value or {})))

Validates the Avatar control.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
 98    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 99        """Helper to add event handlers dynamically."""
100        event_proxy = create_proxy(handler)
101        self.avatar.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
103    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
104        """Fires after configuration attributes have been changed dynamically."""
105        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[Dict[str, Any], bool], NoneType]) -> None:
107    def on_after_hide(self, handler: Callable[[Dict[str, Any], bool], None]) -> None:
108        """Fires after the control is hidden."""
109        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
111    def on_after_show(self, handler: Callable[[Dict[str, Any]], None]) -> None:
112        """Fires after the control is shown."""
113        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_after_validate(self, handler: Callable[[Dict[str, Any], bool], NoneType]) -> None:
115    def on_after_validate(self, handler: Callable[[Dict[str, Any], bool], None]) -> None:
116        """Fires after the control value is validated."""
117        self.add_event_handler('afterValidate', handler)

Fires after the control value is validated.

def on_before_change(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
119    def on_before_change(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
120        """Fires before changing the value of the control."""
121        def event_handler(value):
122            result = handler(value.to_py())
123            if result is False:
124                return js.Boolean(False)
125        self.avatar.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
127    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
128        """Fires before configuration attributes are changed dynamically."""
129        def event_handler(properties):
130            result = handler(properties.to_py())
131            if result is False:
132                return js.Boolean(False)
133        self.avatar.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide(self, handler: Callable[[Dict[str, Any], bool], Optional[bool]]) -> None:
135    def on_before_hide(self, handler: Callable[[Dict[str, Any], bool], Union[bool, None]]) -> None:
136        """Fires before the control is hidden."""
137        def event_handler(value, init):
138            result = handler(value.to_py(), init)
139            if result is False:
140                return js.Boolean(False)
141        self.avatar.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
143    def on_before_show(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
144        """Fires before the control is shown."""
145        def event_handler(value):
146            result = handler(value.to_py())
147            if result is False:
148                return js.Boolean(False)
149        self.avatar.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

def on_before_upload_file(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
151    def on_before_upload_file(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
152        """Fires before file upload begins."""
153        def event_handler(value):
154            result = handler(value.to_py())
155            if result is False:
156                return js.Boolean(False)
157        self.avatar.events.on('beforeUploadFile', create_proxy(event_handler))

Fires before file upload begins.

def on_before_validate(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
159    def on_before_validate(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
160        """Fires before the control value is validated."""
161        def event_handler(value):
162            result = handler(value.to_py())
163            if result is False:
164                return js.Boolean(False)
165        self.avatar.events.on('beforeValidate', create_proxy(event_handler))

Fires before the control value is validated.

def on_blur(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
167    def on_blur(self, handler: Callable[[Dict[str, Any]], None]) -> None:
168        """Fires when the control has lost focus."""
169        self.add_event_handler('blur', handler)

Fires when the control has lost focus.

def on_change(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
171    def on_change(self, handler: Callable[[Dict[str, Any]], None]) -> None:
172        """Fires on changing the value of the control."""
173        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_focus(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
175    def on_focus(self, handler: Callable[[Dict[str, Any]], None]) -> None:
176        """Fires when the control has received focus."""
177        self.add_event_handler('focus', handler)

Fires when the control has received focus.

def on_keydown(self, handler: Callable[[Any], NoneType]) -> None:
179    def on_keydown(self, handler: Callable[[Any], None]) -> None:
180        """Fires when any key is pressed and the control is in focus."""
181        self.add_event_handler('keydown', handler)

Fires when any key is pressed and the control is in focus.

def on_upload_begin(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
183    def on_upload_begin(self, handler: Callable[[Dict[str, Any]], None]) -> None:
184        """Fires when file upload begins."""
185        self.add_event_handler('uploadBegin', handler)

Fires when file upload begins.

def on_upload_complete(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
187    def on_upload_complete(self, handler: Callable[[Dict[str, Any]], None]) -> None:
188        """Fires when upload is completed."""
189        self.add_event_handler('uploadComplete', handler)

Fires when upload is completed.

def on_upload_fail(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
191    def on_upload_fail(self, handler: Callable[[Dict[str, Any]], None]) -> None:
192        """Fires if the file upload failed."""
193        self.add_event_handler('uploadFail', handler)

Fires if the file upload failed.

def on_upload_file( self, handler: Callable[[Dict[str, Any], Dict[str, Any]], NoneType]) -> None:
195    def on_upload_file(self, handler: Callable[[Dict[str, Any], Dict[str, Any]], None]) -> None:
196        """Fires when a file has been uploaded."""
197        self.add_event_handler('uploadFile', handler)

Fires when a file has been uploaded.

def on_upload_progress(self, handler: Callable[[int, Dict[str, Any]], NoneType]) -> None:
199    def on_upload_progress(self, handler: Callable[[int, Dict[str, Any]], None]) -> None:
200        """Fires on each percent of a file uploading."""
201        self.add_event_handler('uploadProgress', handler)

Fires on each percent of a file uploading.

class Button:
 14class Button:
 15    def __init__(self, config: ButtonConfig = None, widget_parent: Any = None):
 16        """Initializes the Button control."""
 17        if config is None:
 18            config = ButtonConfig()
 19        config_dict = config.to_dict()
 20        self.button = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ Button API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from the Button control."""
 26        self.button.blur()
 27
 28    def destructor(self) -> None:
 29        """Removes the Button instance and releases the occupied resources."""
 30        self.button.destructor()
 31
 32    def disable(self) -> None:
 33        """Disables the Button control."""
 34        self.button.disable()
 35
 36    def enable(self) -> None:
 37        """Enables the Button control."""
 38        self.button.enable()
 39
 40    def focus(self) -> None:
 41        """Sets focus to the Button control."""
 42        self.button.focus()
 43
 44    def get_properties(self) -> Dict[str, Any]:
 45        """Returns an object with the available configuration attributes of the control."""
 46        return self.button.getProperties().to_py()
 47
 48    def hide(self) -> None:
 49        """Hides the Button control."""
 50        self.button.hide()
 51
 52    def is_disabled(self) -> bool:
 53        """Checks whether the Button control is disabled."""
 54        return self.button.isDisabled()
 55
 56    def is_visible(self) -> bool:
 57        """Checks whether the Button control is visible on the page."""
 58        return self.button.isVisible()
 59
 60    def set_properties(self, properties: Dict[str, Any]) -> None:
 61        """Allows changing available configuration attributes of the control dynamically."""
 62        self.button.setProperties(js.JSON.parse(json.dumps(properties)))
 63
 64    def show(self) -> None:
 65        """Shows the Button control on the page."""
 66        self.button.show()
 67
 68    """ Button Events """
 69
 70    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 71        """Helper to add event handlers dynamically."""
 72        event_proxy = create_proxy(handler)
 73        self.button.events.on(event_name, event_proxy)
 74
 75    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
 76        """Fires after configuration attributes have been changed dynamically."""
 77        self.add_event_handler('afterChangeProperties', handler)
 78
 79    def on_after_hide(self, handler: Callable[[str, bool], None]) -> None:
 80        """Fires after the Button control is hidden."""
 81        self.add_event_handler('afterHide', handler)
 82
 83    def on_after_show(self, handler: Callable[[str], None]) -> None:
 84        """Fires after the Button control is shown."""
 85        self.add_event_handler('afterShow', handler)
 86
 87    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
 88        """Fires before configuration attributes are changed dynamically."""
 89        def event_handler(properties):
 90            result = handler(properties.to_py())
 91            if result is False:
 92                return js.Boolean(False)
 93        self.button.events.on('beforeChangeProperties', create_proxy(event_handler))
 94
 95    def on_before_hide(self, handler: Callable[[str, bool], Union[bool, None]]) -> None:
 96        """Fires before the Button control is hidden."""
 97        def event_handler(text, init):
 98            result = handler(text, init)
 99            if result is False:
100                return js.Boolean(False)
101        self.button.events.on('beforeHide', create_proxy(event_handler))
102
103    def on_before_show(self, handler: Callable[[str], Union[bool, None]]) -> None:
104        """Fires before the Button control is shown."""
105        def event_handler(text):
106            result = handler(text)
107            if result is False:
108                return js.Boolean(False)
109        self.button.events.on('beforeShow', create_proxy(event_handler))
110
111    def on_blur(self, handler: Callable[[str], None]) -> None:
112        """Fires when the Button control has lost focus."""
113        self.add_event_handler('blur', handler)
114
115    def on_click(self, handler: Callable[[Any], None]) -> None:
116        """Fires after a click on the Button control."""
117        self.add_event_handler('click', handler)
118
119    def on_focus(self, handler: Callable[[str], None]) -> None:
120        """Fires when the Button control has received focus."""
121        self.add_event_handler('focus', handler)
122
123    def on_keydown(self, handler: Callable[[Any], None]) -> None:
124        """Fires when any key is pressed and the Button control is in focus."""
125        self.add_event_handler('keydown', handler)
Button( config: ButtonConfig = None, widget_parent: Any = None)
15    def __init__(self, config: ButtonConfig = None, widget_parent: Any = None):
16        """Initializes the Button control."""
17        if config is None:
18            config = ButtonConfig()
19        config_dict = config.to_dict()
20        self.button = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Button control.

button

Button API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from the Button control."""
26        self.button.blur()

Removes focus from the Button control.

def destructor(self) -> None:
28    def destructor(self) -> None:
29        """Removes the Button instance and releases the occupied resources."""
30        self.button.destructor()

Removes the Button instance and releases the occupied resources.

def disable(self) -> None:
32    def disable(self) -> None:
33        """Disables the Button control."""
34        self.button.disable()

Disables the Button control.

def enable(self) -> None:
36    def enable(self) -> None:
37        """Enables the Button control."""
38        self.button.enable()

Enables the Button control.

def focus(self) -> None:
40    def focus(self) -> None:
41        """Sets focus to the Button control."""
42        self.button.focus()

Sets focus to the Button control.

def get_properties(self) -> Dict[str, Any]:
44    def get_properties(self) -> Dict[str, Any]:
45        """Returns an object with the available configuration attributes of the control."""
46        return self.button.getProperties().to_py()

Returns an object with the available configuration attributes of the control.

def hide(self) -> None:
48    def hide(self) -> None:
49        """Hides the Button control."""
50        self.button.hide()

Hides the Button control.

def is_disabled(self) -> bool:
52    def is_disabled(self) -> bool:
53        """Checks whether the Button control is disabled."""
54        return self.button.isDisabled()

Checks whether the Button control is disabled.

def is_visible(self) -> bool:
56    def is_visible(self) -> bool:
57        """Checks whether the Button control is visible on the page."""
58        return self.button.isVisible()

Checks whether the Button control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
60    def set_properties(self, properties: Dict[str, Any]) -> None:
61        """Allows changing available configuration attributes of the control dynamically."""
62        self.button.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing available configuration attributes of the control dynamically.

def show(self) -> None:
64    def show(self) -> None:
65        """Shows the Button control on the page."""
66        self.button.show()

Shows the Button control on the page.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
70    def add_event_handler(self, event_name: str, handler: Callable) -> None:
71        """Helper to add event handlers dynamically."""
72        event_proxy = create_proxy(handler)
73        self.button.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
75    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
76        """Fires after configuration attributes have been changed dynamically."""
77        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[str, bool], NoneType]) -> None:
79    def on_after_hide(self, handler: Callable[[str, bool], None]) -> None:
80        """Fires after the Button control is hidden."""
81        self.add_event_handler('afterHide', handler)

Fires after the Button control is hidden.

def on_after_show(self, handler: Callable[[str], NoneType]) -> None:
83    def on_after_show(self, handler: Callable[[str], None]) -> None:
84        """Fires after the Button control is shown."""
85        self.add_event_handler('afterShow', handler)

Fires after the Button control is shown.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
87    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
88        """Fires before configuration attributes are changed dynamically."""
89        def event_handler(properties):
90            result = handler(properties.to_py())
91            if result is False:
92                return js.Boolean(False)
93        self.button.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide(self, handler: Callable[[str, bool], Optional[bool]]) -> None:
 95    def on_before_hide(self, handler: Callable[[str, bool], Union[bool, None]]) -> None:
 96        """Fires before the Button control is hidden."""
 97        def event_handler(text, init):
 98            result = handler(text, init)
 99            if result is False:
100                return js.Boolean(False)
101        self.button.events.on('beforeHide', create_proxy(event_handler))

Fires before the Button control is hidden.

def on_before_show(self, handler: Callable[[str], Optional[bool]]) -> None:
103    def on_before_show(self, handler: Callable[[str], Union[bool, None]]) -> None:
104        """Fires before the Button control is shown."""
105        def event_handler(text):
106            result = handler(text)
107            if result is False:
108                return js.Boolean(False)
109        self.button.events.on('beforeShow', create_proxy(event_handler))

Fires before the Button control is shown.

def on_blur(self, handler: Callable[[str], NoneType]) -> None:
111    def on_blur(self, handler: Callable[[str], None]) -> None:
112        """Fires when the Button control has lost focus."""
113        self.add_event_handler('blur', handler)

Fires when the Button control has lost focus.

def on_click(self, handler: Callable[[Any], NoneType]) -> None:
115    def on_click(self, handler: Callable[[Any], None]) -> None:
116        """Fires after a click on the Button control."""
117        self.add_event_handler('click', handler)

Fires after a click on the Button control.

def on_focus(self, handler: Callable[[str], NoneType]) -> None:
119    def on_focus(self, handler: Callable[[str], None]) -> None:
120        """Fires when the Button control has received focus."""
121        self.add_event_handler('focus', handler)

Fires when the Button control has received focus.

def on_keydown(self, handler: Callable[[Any], NoneType]) -> None:
123    def on_keydown(self, handler: Callable[[Any], None]) -> None:
124        """Fires when any key is pressed and the Button control is in focus."""
125        self.add_event_handler('keydown', handler)

Fires when any key is pressed and the Button control is in focus.

class Checkbox:
 14class Checkbox:
 15    def __init__(self, config: CheckboxConfig = None, widget_parent: Any = None):
 16        """Initializes the Checkbox control."""
 17        if config is None:
 18            config = CheckboxConfig()
 19        config_dict = config.to_dict()
 20        self.checkbox = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ Checkbox API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from the Checkbox control."""
 26        self.checkbox.blur()
 27
 28    def clear(self) -> None:
 29        """Clears the value of the Checkbox control."""
 30        self.checkbox.clear()
 31
 32    def clear_validate(self) -> None:
 33        """Clears validation of the Checkbox control."""
 34        self.checkbox.clearValidate()
 35
 36    def destructor(self) -> None:
 37        """Removes the Checkbox instance and releases the occupied resources."""
 38        self.checkbox.destructor()
 39
 40    def disable(self) -> None:
 41        """Disables the Checkbox control."""
 42        self.checkbox.disable()
 43
 44    def enable(self) -> None:
 45        """Enables the Checkbox control."""
 46        self.checkbox.enable()
 47
 48    def focus(self) -> None:
 49        """Sets focus to the Checkbox control."""
 50        self.checkbox.focus()
 51
 52    def get_properties(self) -> Dict[str, Any]:
 53        """Returns the configuration attributes of the control."""
 54        return self.checkbox.getProperties().to_py()
 55
 56    def get_value(self) -> Union[str, bool]:
 57        """Returns the current value/state of the Checkbox control."""
 58        return self.checkbox.getValue()
 59
 60    def hide(self) -> None:
 61        """Hides the Checkbox control."""
 62        self.checkbox.hide()
 63
 64    def is_checked(self) -> bool:
 65        """Checks whether the Checkbox control is checked."""
 66        return self.checkbox.isChecked()
 67
 68    def is_disabled(self) -> bool:
 69        """Checks whether the Checkbox control is disabled."""
 70        return self.checkbox.isDisabled()
 71
 72    def is_visible(self) -> bool:
 73        """Checks whether the Checkbox control is visible on the page."""
 74        return self.checkbox.isVisible()
 75
 76    def set_properties(self, properties: Dict[str, Any]) -> None:
 77        """Allows changing configuration attributes of the control dynamically."""
 78        self.checkbox.setProperties(js.JSON.parse(json.dumps(properties)))
 79
 80    def set_value(self, checked: bool) -> None:
 81        """Sets the state for the Checkbox control."""
 82        self.checkbox.setValue(checked)
 83
 84    def show(self) -> None:
 85        """Shows the Checkbox control on the page."""
 86        self.checkbox.show()
 87
 88    def validate(self, silent: bool = False) -> bool:
 89        """Validates the Checkbox control."""
 90        return self.checkbox.validate(silent)
 91
 92    """ Checkbox Events """
 93
 94    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 95        """Helper to add event handlers dynamically."""
 96        event_proxy = create_proxy(handler)
 97        self.checkbox.events.on(event_name, event_proxy)
 98
 99    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
100        """Fires after configuration attributes have been changed dynamically."""
101        self.add_event_handler('afterChangeProperties', handler)
102
103    def on_after_hide(self, handler: Callable[[Union[str, bool], bool], None]) -> None:
104        """Fires after the control is hidden."""
105        self.add_event_handler('afterHide', handler)
106
107    def on_after_show(self, handler: Callable[[Union[str, bool]], None]) -> None:
108        """Fires after the control is shown."""
109        self.add_event_handler('afterShow', handler)
110
111    def on_after_validate(self, handler: Callable[[Union[str, bool], bool], None]) -> None:
112        """Fires after the control value is validated."""
113        self.add_event_handler('afterValidate', handler)
114
115    def on_before_change(self, handler: Callable[[Union[str, bool]], Union[bool, None]]) -> None:
116        """Fires before changing the value of the control."""
117        def event_handler(value):
118            result = handler(value)
119            if result is False:
120                return js.Boolean(False)
121        self.checkbox.events.on('beforeChange', create_proxy(event_handler))
122
123    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
124        """Fires before configuration attributes are changed dynamically."""
125        def event_handler(properties):
126            result = handler(properties.to_py())
127            if result is False:
128                return js.Boolean(False)
129        self.checkbox.events.on('beforeChangeProperties', create_proxy(event_handler))
130
131    def on_before_hide(self, handler: Callable[[Union[str, bool], bool], Union[bool, None]]) -> None:
132        """Fires before the control is hidden."""
133        def event_handler(value, init):
134            result = handler(value, init)
135            if result is False:
136                return js.Boolean(False)
137        self.checkbox.events.on('beforeHide', create_proxy(event_handler))
138
139    def on_before_show(self, handler: Callable[[Union[str, bool]], Union[bool, None]]) -> None:
140        """Fires before the control is shown."""
141        def event_handler(value):
142            result = handler(value)
143            if result is False:
144                return js.Boolean(False)
145        self.checkbox.events.on('beforeShow', create_proxy(event_handler))
146
147    def on_before_validate(self, handler: Callable[[Union[str, bool]], Union[bool, None]]) -> None:
148        """Fires before the control value is validated."""
149        def event_handler(value):
150            result = handler(value)
151            if result is False:
152                return js.Boolean(False)
153        self.checkbox.events.on('beforeValidate', create_proxy(event_handler))
154
155    def on_blur(self, handler: Callable[[Union[str, bool]], None]) -> None:
156        """Fires when the control has lost focus."""
157        self.add_event_handler('blur', handler)
158
159    def on_change(self, handler: Callable[[Union[str, bool]], None]) -> None:
160        """Fires on changing the value of the control."""
161        self.add_event_handler('change', handler)
162
163    def on_focus(self, handler: Callable[[Union[str, bool]], None]) -> None:
164        """Fires when the control has received focus."""
165        self.add_event_handler('focus', handler)
166
167    def on_keydown(self, handler: Callable[[Any], None]) -> None:
168        """Fires when any key is pressed and the control is in focus."""
169        self.add_event_handler('keydown', handler)
Checkbox( config: CheckboxConfig = None, widget_parent: Any = None)
15    def __init__(self, config: CheckboxConfig = None, widget_parent: Any = None):
16        """Initializes the Checkbox control."""
17        if config is None:
18            config = CheckboxConfig()
19        config_dict = config.to_dict()
20        self.checkbox = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Checkbox control.

checkbox

Checkbox API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from the Checkbox control."""
26        self.checkbox.blur()

Removes focus from the Checkbox control.

def clear(self) -> None:
28    def clear(self) -> None:
29        """Clears the value of the Checkbox control."""
30        self.checkbox.clear()

Clears the value of the Checkbox control.

def clear_validate(self) -> None:
32    def clear_validate(self) -> None:
33        """Clears validation of the Checkbox control."""
34        self.checkbox.clearValidate()

Clears validation of the Checkbox control.

def destructor(self) -> None:
36    def destructor(self) -> None:
37        """Removes the Checkbox instance and releases the occupied resources."""
38        self.checkbox.destructor()

Removes the Checkbox instance and releases the occupied resources.

def disable(self) -> None:
40    def disable(self) -> None:
41        """Disables the Checkbox control."""
42        self.checkbox.disable()

Disables the Checkbox control.

def enable(self) -> None:
44    def enable(self) -> None:
45        """Enables the Checkbox control."""
46        self.checkbox.enable()

Enables the Checkbox control.

def focus(self) -> None:
48    def focus(self) -> None:
49        """Sets focus to the Checkbox control."""
50        self.checkbox.focus()

Sets focus to the Checkbox control.

def get_properties(self) -> Dict[str, Any]:
52    def get_properties(self) -> Dict[str, Any]:
53        """Returns the configuration attributes of the control."""
54        return self.checkbox.getProperties().to_py()

Returns the configuration attributes of the control.

def get_value(self) -> Union[str, bool]:
56    def get_value(self) -> Union[str, bool]:
57        """Returns the current value/state of the Checkbox control."""
58        return self.checkbox.getValue()

Returns the current value/state of the Checkbox control.

def hide(self) -> None:
60    def hide(self) -> None:
61        """Hides the Checkbox control."""
62        self.checkbox.hide()

Hides the Checkbox control.

def is_checked(self) -> bool:
64    def is_checked(self) -> bool:
65        """Checks whether the Checkbox control is checked."""
66        return self.checkbox.isChecked()

Checks whether the Checkbox control is checked.

def is_disabled(self) -> bool:
68    def is_disabled(self) -> bool:
69        """Checks whether the Checkbox control is disabled."""
70        return self.checkbox.isDisabled()

Checks whether the Checkbox control is disabled.

def is_visible(self) -> bool:
72    def is_visible(self) -> bool:
73        """Checks whether the Checkbox control is visible on the page."""
74        return self.checkbox.isVisible()

Checks whether the Checkbox control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
76    def set_properties(self, properties: Dict[str, Any]) -> None:
77        """Allows changing configuration attributes of the control dynamically."""
78        self.checkbox.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def set_value(self, checked: bool) -> None:
80    def set_value(self, checked: bool) -> None:
81        """Sets the state for the Checkbox control."""
82        self.checkbox.setValue(checked)

Sets the state for the Checkbox control.

def show(self) -> None:
84    def show(self) -> None:
85        """Shows the Checkbox control on the page."""
86        self.checkbox.show()

Shows the Checkbox control on the page.

def validate(self, silent: bool = False) -> bool:
88    def validate(self, silent: bool = False) -> bool:
89        """Validates the Checkbox control."""
90        return self.checkbox.validate(silent)

Validates the Checkbox control.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
94    def add_event_handler(self, event_name: str, handler: Callable) -> None:
95        """Helper to add event handlers dynamically."""
96        event_proxy = create_proxy(handler)
97        self.checkbox.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
 99    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
100        """Fires after configuration attributes have been changed dynamically."""
101        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[Union[str, bool], bool], NoneType]) -> None:
103    def on_after_hide(self, handler: Callable[[Union[str, bool], bool], None]) -> None:
104        """Fires after the control is hidden."""
105        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show(self, handler: Callable[[Union[str, bool]], NoneType]) -> None:
107    def on_after_show(self, handler: Callable[[Union[str, bool]], None]) -> None:
108        """Fires after the control is shown."""
109        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_after_validate(self, handler: Callable[[Union[str, bool], bool], NoneType]) -> None:
111    def on_after_validate(self, handler: Callable[[Union[str, bool], bool], None]) -> None:
112        """Fires after the control value is validated."""
113        self.add_event_handler('afterValidate', handler)

Fires after the control value is validated.

def on_before_change(self, handler: Callable[[Union[str, bool]], Optional[bool]]) -> None:
115    def on_before_change(self, handler: Callable[[Union[str, bool]], Union[bool, None]]) -> None:
116        """Fires before changing the value of the control."""
117        def event_handler(value):
118            result = handler(value)
119            if result is False:
120                return js.Boolean(False)
121        self.checkbox.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
123    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
124        """Fires before configuration attributes are changed dynamically."""
125        def event_handler(properties):
126            result = handler(properties.to_py())
127            if result is False:
128                return js.Boolean(False)
129        self.checkbox.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide( self, handler: Callable[[Union[str, bool], bool], Optional[bool]]) -> None:
131    def on_before_hide(self, handler: Callable[[Union[str, bool], bool], Union[bool, None]]) -> None:
132        """Fires before the control is hidden."""
133        def event_handler(value, init):
134            result = handler(value, init)
135            if result is False:
136                return js.Boolean(False)
137        self.checkbox.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show(self, handler: Callable[[Union[str, bool]], Optional[bool]]) -> None:
139    def on_before_show(self, handler: Callable[[Union[str, bool]], Union[bool, None]]) -> None:
140        """Fires before the control is shown."""
141        def event_handler(value):
142            result = handler(value)
143            if result is False:
144                return js.Boolean(False)
145        self.checkbox.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

def on_before_validate(self, handler: Callable[[Union[str, bool]], Optional[bool]]) -> None:
147    def on_before_validate(self, handler: Callable[[Union[str, bool]], Union[bool, None]]) -> None:
148        """Fires before the control value is validated."""
149        def event_handler(value):
150            result = handler(value)
151            if result is False:
152                return js.Boolean(False)
153        self.checkbox.events.on('beforeValidate', create_proxy(event_handler))

Fires before the control value is validated.

def on_blur(self, handler: Callable[[Union[str, bool]], NoneType]) -> None:
155    def on_blur(self, handler: Callable[[Union[str, bool]], None]) -> None:
156        """Fires when the control has lost focus."""
157        self.add_event_handler('blur', handler)

Fires when the control has lost focus.

def on_change(self, handler: Callable[[Union[str, bool]], NoneType]) -> None:
159    def on_change(self, handler: Callable[[Union[str, bool]], None]) -> None:
160        """Fires on changing the value of the control."""
161        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_focus(self, handler: Callable[[Union[str, bool]], NoneType]) -> None:
163    def on_focus(self, handler: Callable[[Union[str, bool]], None]) -> None:
164        """Fires when the control has received focus."""
165        self.add_event_handler('focus', handler)

Fires when the control has received focus.

def on_keydown(self, handler: Callable[[Any], NoneType]) -> None:
167    def on_keydown(self, handler: Callable[[Any], None]) -> None:
168        """Fires when any key is pressed and the control is in focus."""
169        self.add_event_handler('keydown', handler)

Fires when any key is pressed and the control is in focus.

class CheckboxGroup:
 14class CheckboxGroup:
 15    def __init__(self, config: CheckboxGroupConfig = None, widget_parent: Any = None):
 16        """Initializes the CheckboxGroup control."""
 17        if config is None:
 18            config = CheckboxGroupConfig()
 19        config_dict = config.to_dict()
 20        self.checkboxgroup = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ CheckboxGroup API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from the CheckboxGroup control."""
 26        self.checkboxgroup.blur()
 27
 28    def clear(self) -> None:
 29        """Clears the value of the CheckboxGroup control."""
 30        self.checkboxgroup.clear()
 31
 32    def clear_validate(self) -> None:
 33        """Clears validation of the CheckboxGroup control."""
 34        self.checkboxgroup.clearValidate()
 35
 36    def destructor(self) -> None:
 37        """Removes the CheckboxGroup instance and releases the occupied resources."""
 38        self.checkboxgroup.destructor()
 39
 40    def disable(self, id: str = None) -> None:
 41        """Disables the CheckboxGroup control or a specific checkbox."""
 42        self.checkboxgroup.disable(id)
 43
 44    def enable(self, id: str = None) -> None:
 45        """Enables the CheckboxGroup control or a specific checkbox."""
 46        self.checkboxgroup.enable(id)
 47
 48    def focus(self, id: str = None) -> None:
 49        """Sets focus to a checkbox of the CheckboxGroup control."""
 50        self.checkboxgroup.focus(id)
 51
 52    def get_properties(self, id: str = None) -> Dict[str, Any]:
 53        """Returns configuration attributes of the control or a specific checkbox."""
 54        return self.checkboxgroup.getProperties(id).to_py()
 55
 56    def get_value(self, id: str = None) -> Union[str, bool, Dict[str, Union[str, bool]]]:
 57        """Returns the current value/state of the control or a specific checkbox."""
 58        return self.checkboxgroup.getValue(id)
 59
 60    def hide(self, id: str = None) -> None:
 61        """Hides the CheckboxGroup control or a specific checkbox."""
 62        self.checkboxgroup.hide(id)
 63
 64    def is_checked(self, id: str = None) -> Union[bool, Dict[str, bool]]:
 65        """Checks whether a checkbox is checked."""
 66        return self.checkboxgroup.isChecked(id)
 67
 68    def is_disabled(self, id: str = None) -> bool:
 69        """Checks whether the control or a specific checkbox is disabled."""
 70        return self.checkboxgroup.isDisabled(id)
 71
 72    def is_visible(self, id: str = None) -> bool:
 73        """Checks whether the control or a specific checkbox is visible."""
 74        return self.checkboxgroup.isVisible(id)
 75
 76    def set_properties(self, arg: Union[str, Dict[str, Any]] = None, properties: Dict[str, Any] = None) -> None:
 77        """Allows changing configuration attributes of the control dynamically."""
 78        if isinstance(arg, str):
 79            self.checkboxgroup.setProperties(arg, js.JSON.parse(json.dumps(properties)))
 80        elif isinstance(arg, dict):
 81            props = {k: js.JSON.parse(json.dumps(v)) for k, v in arg.items()}
 82            self.checkboxgroup.setProperties(props)
 83        else:
 84            self.checkboxgroup.setProperties(js.JSON.parse(json.dumps(properties or {})))
 85
 86    def set_value(self, value: Dict[str, Union[str, bool]]) -> None:
 87        """Sets the value for the CheckboxGroup control."""
 88        self.checkboxgroup.setValue(js.JSON.parse(json.dumps(value)))
 89
 90    def show(self, id: str = None) -> None:
 91        """Shows the CheckboxGroup control or a specific checkbox."""
 92        self.checkboxgroup.show(id)
 93
 94    def validate(self, silent: bool = False) -> bool:
 95        """Validates the CheckboxGroup control."""
 96        return self.checkboxgroup.validate(silent)
 97
 98    """ CheckboxGroup Events """
 99
100    def add_event_handler(self, event_name: str, handler: Callable) -> None:
101        """Helper to add event handlers dynamically."""
102        event_proxy = create_proxy(handler)
103        self.checkboxgroup.events.on(event_name, event_proxy)
104
105    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
106        """Fires after configuration attributes have been changed dynamically."""
107        self.add_event_handler('afterChangeProperties', handler)
108
109    def on_after_hide(self, handler: Callable[[Dict[str, Union[str, bool]], str, bool], None]) -> None:
110        """Fires after the control or its checkbox is hidden."""
111        self.add_event_handler('afterHide', handler)
112
113    def on_after_show(self, handler: Callable[[Dict[str, Union[str, bool]], str], None]) -> None:
114        """Fires after the control or its checkbox is shown."""
115        self.add_event_handler('afterShow', handler)
116
117    def on_after_validate(self, handler: Callable[[Dict[str, Union[str, bool]], bool], None]) -> None:
118        """Fires after the control value is validated."""
119        self.add_event_handler('afterValidate', handler)
120
121    def on_before_change(self, handler: Callable[[Dict[str, Union[str, bool]]], Union[bool, None]]) -> None:
122        """Fires before changing the value of the control."""
123        def event_handler(value):
124            result = handler(value.to_py())
125            if result is False:
126                return js.Boolean(False)
127        self.checkboxgroup.events.on('beforeChange', create_proxy(event_handler))
128
129    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
130        """Fires before configuration attributes are changed dynamically."""
131        def event_handler(properties):
132            result = handler(properties.to_py())
133            if result is False:
134                return js.Boolean(False)
135        self.checkboxgroup.events.on('beforeChangeProperties', create_proxy(event_handler))
136
137    def on_before_hide(self, handler: Callable[[Dict[str, Union[str, bool]], str, bool], Union[bool, None]]) -> None:
138        """Fires before the control or its checkbox is hidden."""
139        def event_handler(value, id=None, init=None):
140            result = handler(value.to_py(), id, init)
141            if result is False:
142                return js.Boolean(False)
143        self.checkboxgroup.events.on('beforeHide', create_proxy(event_handler))
144
145    def on_before_show(self, handler: Callable[[Dict[str, Union[str, bool]], str], Union[bool, None]]) -> None:
146        """Fires before the control or its checkbox is shown."""
147        def event_handler(value, id=None):
148            result = handler(value.to_py(), id)
149            if result is False:
150                return js.Boolean(False)
151        self.checkboxgroup.events.on('beforeShow', create_proxy(event_handler))
152
153    def on_before_validate(self, handler: Callable[[Dict[str, Union[str, bool]]], Union[bool, None]]) -> None:
154        """Fires before the control value is validated."""
155        def event_handler(value):
156            result = handler(value.to_py())
157            if result is False:
158                return js.Boolean(False)
159        self.checkboxgroup.events.on('beforeValidate', create_proxy(event_handler))
160
161    def on_blur(self, handler: Callable[[Dict[str, Union[str, bool]], str], None]) -> None:
162        """Fires when the control has lost focus."""
163        self.add_event_handler('blur', handler)
164
165    def on_change(self, handler: Callable[[Dict[str, Union[str, bool]]], None]) -> None:
166        """Fires on changing the value of the control."""
167        self.add_event_handler('change', handler)
168
169    def on_focus(self, handler: Callable[[Dict[str, Union[str, bool]], str], None]) -> None:
170        """Fires when the control has received focus."""
171        self.add_event_handler('focus', handler)
172
173    def on_keydown(self, handler: Callable[[Any, str], None]) -> None:
174        """Fires when any key is pressed and a checkbox is in focus."""
175        self.add_event_handler('keydown', handler)
CheckboxGroup( config: CheckboxGroupConfig = None, widget_parent: Any = None)
15    def __init__(self, config: CheckboxGroupConfig = None, widget_parent: Any = None):
16        """Initializes the CheckboxGroup control."""
17        if config is None:
18            config = CheckboxGroupConfig()
19        config_dict = config.to_dict()
20        self.checkboxgroup = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the CheckboxGroup control.

checkboxgroup

CheckboxGroup API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from the CheckboxGroup control."""
26        self.checkboxgroup.blur()

Removes focus from the CheckboxGroup control.

def clear(self) -> None:
28    def clear(self) -> None:
29        """Clears the value of the CheckboxGroup control."""
30        self.checkboxgroup.clear()

Clears the value of the CheckboxGroup control.

def clear_validate(self) -> None:
32    def clear_validate(self) -> None:
33        """Clears validation of the CheckboxGroup control."""
34        self.checkboxgroup.clearValidate()

Clears validation of the CheckboxGroup control.

def destructor(self) -> None:
36    def destructor(self) -> None:
37        """Removes the CheckboxGroup instance and releases the occupied resources."""
38        self.checkboxgroup.destructor()

Removes the CheckboxGroup instance and releases the occupied resources.

def disable(self, id: str = None) -> None:
40    def disable(self, id: str = None) -> None:
41        """Disables the CheckboxGroup control or a specific checkbox."""
42        self.checkboxgroup.disable(id)

Disables the CheckboxGroup control or a specific checkbox.

def enable(self, id: str = None) -> None:
44    def enable(self, id: str = None) -> None:
45        """Enables the CheckboxGroup control or a specific checkbox."""
46        self.checkboxgroup.enable(id)

Enables the CheckboxGroup control or a specific checkbox.

def focus(self, id: str = None) -> None:
48    def focus(self, id: str = None) -> None:
49        """Sets focus to a checkbox of the CheckboxGroup control."""
50        self.checkboxgroup.focus(id)

Sets focus to a checkbox of the CheckboxGroup control.

def get_properties(self, id: str = None) -> Dict[str, Any]:
52    def get_properties(self, id: str = None) -> Dict[str, Any]:
53        """Returns configuration attributes of the control or a specific checkbox."""
54        return self.checkboxgroup.getProperties(id).to_py()

Returns configuration attributes of the control or a specific checkbox.

def get_value(self, id: str = None) -> Union[str, bool, Dict[str, Union[str, bool]]]:
56    def get_value(self, id: str = None) -> Union[str, bool, Dict[str, Union[str, bool]]]:
57        """Returns the current value/state of the control or a specific checkbox."""
58        return self.checkboxgroup.getValue(id)

Returns the current value/state of the control or a specific checkbox.

def hide(self, id: str = None) -> None:
60    def hide(self, id: str = None) -> None:
61        """Hides the CheckboxGroup control or a specific checkbox."""
62        self.checkboxgroup.hide(id)

Hides the CheckboxGroup control or a specific checkbox.

def is_checked(self, id: str = None) -> Union[bool, Dict[str, bool]]:
64    def is_checked(self, id: str = None) -> Union[bool, Dict[str, bool]]:
65        """Checks whether a checkbox is checked."""
66        return self.checkboxgroup.isChecked(id)

Checks whether a checkbox is checked.

def is_disabled(self, id: str = None) -> bool:
68    def is_disabled(self, id: str = None) -> bool:
69        """Checks whether the control or a specific checkbox is disabled."""
70        return self.checkboxgroup.isDisabled(id)

Checks whether the control or a specific checkbox is disabled.

def is_visible(self, id: str = None) -> bool:
72    def is_visible(self, id: str = None) -> bool:
73        """Checks whether the control or a specific checkbox is visible."""
74        return self.checkboxgroup.isVisible(id)

Checks whether the control or a specific checkbox is visible.

def set_properties( self, arg: Union[str, Dict[str, Any]] = None, properties: Dict[str, Any] = None) -> None:
76    def set_properties(self, arg: Union[str, Dict[str, Any]] = None, properties: Dict[str, Any] = None) -> None:
77        """Allows changing configuration attributes of the control dynamically."""
78        if isinstance(arg, str):
79            self.checkboxgroup.setProperties(arg, js.JSON.parse(json.dumps(properties)))
80        elif isinstance(arg, dict):
81            props = {k: js.JSON.parse(json.dumps(v)) for k, v in arg.items()}
82            self.checkboxgroup.setProperties(props)
83        else:
84            self.checkboxgroup.setProperties(js.JSON.parse(json.dumps(properties or {})))

Allows changing configuration attributes of the control dynamically.

def set_value(self, value: Dict[str, Union[str, bool]]) -> None:
86    def set_value(self, value: Dict[str, Union[str, bool]]) -> None:
87        """Sets the value for the CheckboxGroup control."""
88        self.checkboxgroup.setValue(js.JSON.parse(json.dumps(value)))

Sets the value for the CheckboxGroup control.

def show(self, id: str = None) -> None:
90    def show(self, id: str = None) -> None:
91        """Shows the CheckboxGroup control or a specific checkbox."""
92        self.checkboxgroup.show(id)

Shows the CheckboxGroup control or a specific checkbox.

def validate(self, silent: bool = False) -> bool:
94    def validate(self, silent: bool = False) -> bool:
95        """Validates the CheckboxGroup control."""
96        return self.checkboxgroup.validate(silent)

Validates the CheckboxGroup control.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
100    def add_event_handler(self, event_name: str, handler: Callable) -> None:
101        """Helper to add event handlers dynamically."""
102        event_proxy = create_proxy(handler)
103        self.checkboxgroup.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
105    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
106        """Fires after configuration attributes have been changed dynamically."""
107        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide( self, handler: Callable[[Dict[str, Union[str, bool]], str, bool], NoneType]) -> None:
109    def on_after_hide(self, handler: Callable[[Dict[str, Union[str, bool]], str, bool], None]) -> None:
110        """Fires after the control or its checkbox is hidden."""
111        self.add_event_handler('afterHide', handler)

Fires after the control or its checkbox is hidden.

def on_after_show( self, handler: Callable[[Dict[str, Union[str, bool]], str], NoneType]) -> None:
113    def on_after_show(self, handler: Callable[[Dict[str, Union[str, bool]], str], None]) -> None:
114        """Fires after the control or its checkbox is shown."""
115        self.add_event_handler('afterShow', handler)

Fires after the control or its checkbox is shown.

def on_after_validate( self, handler: Callable[[Dict[str, Union[str, bool]], bool], NoneType]) -> None:
117    def on_after_validate(self, handler: Callable[[Dict[str, Union[str, bool]], bool], None]) -> None:
118        """Fires after the control value is validated."""
119        self.add_event_handler('afterValidate', handler)

Fires after the control value is validated.

def on_before_change( self, handler: Callable[[Dict[str, Union[str, bool]]], Optional[bool]]) -> None:
121    def on_before_change(self, handler: Callable[[Dict[str, Union[str, bool]]], Union[bool, None]]) -> None:
122        """Fires before changing the value of the control."""
123        def event_handler(value):
124            result = handler(value.to_py())
125            if result is False:
126                return js.Boolean(False)
127        self.checkboxgroup.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
129    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
130        """Fires before configuration attributes are changed dynamically."""
131        def event_handler(properties):
132            result = handler(properties.to_py())
133            if result is False:
134                return js.Boolean(False)
135        self.checkboxgroup.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide( self, handler: Callable[[Dict[str, Union[str, bool]], str, bool], Optional[bool]]) -> None:
137    def on_before_hide(self, handler: Callable[[Dict[str, Union[str, bool]], str, bool], Union[bool, None]]) -> None:
138        """Fires before the control or its checkbox is hidden."""
139        def event_handler(value, id=None, init=None):
140            result = handler(value.to_py(), id, init)
141            if result is False:
142                return js.Boolean(False)
143        self.checkboxgroup.events.on('beforeHide', create_proxy(event_handler))

Fires before the control or its checkbox is hidden.

def on_before_show( self, handler: Callable[[Dict[str, Union[str, bool]], str], Optional[bool]]) -> None:
145    def on_before_show(self, handler: Callable[[Dict[str, Union[str, bool]], str], Union[bool, None]]) -> None:
146        """Fires before the control or its checkbox is shown."""
147        def event_handler(value, id=None):
148            result = handler(value.to_py(), id)
149            if result is False:
150                return js.Boolean(False)
151        self.checkboxgroup.events.on('beforeShow', create_proxy(event_handler))

Fires before the control or its checkbox is shown.

def on_before_validate( self, handler: Callable[[Dict[str, Union[str, bool]]], Optional[bool]]) -> None:
153    def on_before_validate(self, handler: Callable[[Dict[str, Union[str, bool]]], Union[bool, None]]) -> None:
154        """Fires before the control value is validated."""
155        def event_handler(value):
156            result = handler(value.to_py())
157            if result is False:
158                return js.Boolean(False)
159        self.checkboxgroup.events.on('beforeValidate', create_proxy(event_handler))

Fires before the control value is validated.

def on_blur( self, handler: Callable[[Dict[str, Union[str, bool]], str], NoneType]) -> None:
161    def on_blur(self, handler: Callable[[Dict[str, Union[str, bool]], str], None]) -> None:
162        """Fires when the control has lost focus."""
163        self.add_event_handler('blur', handler)

Fires when the control has lost focus.

def on_change(self, handler: Callable[[Dict[str, Union[str, bool]]], NoneType]) -> None:
165    def on_change(self, handler: Callable[[Dict[str, Union[str, bool]]], None]) -> None:
166        """Fires on changing the value of the control."""
167        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_focus( self, handler: Callable[[Dict[str, Union[str, bool]], str], NoneType]) -> None:
169    def on_focus(self, handler: Callable[[Dict[str, Union[str, bool]], str], None]) -> None:
170        """Fires when the control has received focus."""
171        self.add_event_handler('focus', handler)

Fires when the control has received focus.

def on_keydown(self, handler: Callable[[Any, str], NoneType]) -> None:
173    def on_keydown(self, handler: Callable[[Any, str], None]) -> None:
174        """Fires when any key is pressed and a checkbox is in focus."""
175        self.add_event_handler('keydown', handler)

Fires when any key is pressed and a checkbox is in focus.

class Colorpicker:
 15class Colorpicker:
 16    def __init__(self, config: ColorpickerConfig = None, widget_parent: Any = None):
 17        """Initializes the ColorPicker control."""
 18        if config is None:
 19            config = ColorPickerConfig()
 20        config_dict = config.to_dict()
 21        self.colorpicker = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 22
 23    """ ColorPicker API Functions """
 24
 25    def blur(self) -> None:
 26        """Removes focus from the ColorPicker control."""
 27        self.colorpicker.blur()
 28
 29    def clear(self) -> None:
 30        """Clears the value of the ColorPicker control."""
 31        self.colorpicker.clear()
 32
 33    def clear_validate(self) -> None:
 34        """Clears validation of the ColorPicker control."""
 35        self.colorpicker.clearValidate()
 36
 37    def destructor(self) -> None:
 38        """Removes the ColorPicker instance and releases the occupied resources."""
 39        self.colorpicker.destructor()
 40
 41    def disable(self) -> None:
 42        """Disables the ColorPicker control."""
 43        self.colorpicker.disable()
 44
 45    def enable(self) -> None:
 46        """Enables the ColorPicker control."""
 47        self.colorpicker.enable()
 48
 49    def focus(self) -> None:
 50        """Sets focus to the ColorPicker control."""
 51        self.colorpicker.focus()
 52
 53    def get_properties(self) -> Dict[str, Any]:
 54        """Returns the configuration attributes of the control."""
 55        return self.colorpicker.getProperties().to_py()
 56
 57    def get_value(self) -> str:
 58        """Returns the current value of the ColorPicker control (in Hex format)."""
 59        return self.colorpicker.getValue()
 60
 61    def get_widget(self) -> Any:
 62        """Returns the DHTMLX ColorPicker widget attached to the control."""
 63        return self.colorpicker.getWidget()
 64
 65    def hide(self) -> None:
 66        """Hides the ColorPicker control."""
 67        self.colorpicker.hide()
 68
 69    def is_disabled(self) -> bool:
 70        """Checks whether the ColorPicker control is disabled."""
 71        return self.colorpicker.isDisabled()
 72
 73    def is_visible(self) -> bool:
 74        """Checks whether the ColorPicker control is visible on the page."""
 75        return self.colorpicker.isVisible()
 76
 77    def set_properties(self, properties: Dict[str, Any]) -> None:
 78        """Allows changing configuration attributes of the control dynamically."""
 79        self.colorpicker.setProperties(js.JSON.parse(json.dumps(properties)))
 80
 81    def set_value(self, value: str) -> None:
 82        """Sets the value for the ColorPicker control (Hex format)."""
 83        self.colorpicker.setValue(value)
 84
 85    def show(self) -> None:
 86        """Shows the ColorPicker control on the page."""
 87        self.colorpicker.show()
 88
 89    def validate(self, silent: bool = False, validate_value: str = None) -> bool:
 90        """Validates the ColorPicker control."""
 91        return self.colorpicker.validate(silent, validate_value)
 92
 93    """ ColorPicker Events """
 94
 95    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 96        """Helper to add event handlers dynamically."""
 97        event_proxy = create_proxy(handler)
 98        self.colorpicker.events.on(event_name, event_proxy)
 99
100    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
101        """Fires after configuration attributes have been changed dynamically."""
102        self.add_event_handler('afterChangeProperties', handler)
103
104    def on_after_hide(self, handler: Callable[[str, bool], None]) -> None:
105        """Fires after the control is hidden."""
106        self.add_event_handler('afterHide', handler)
107
108    def on_after_show(self, handler: Callable[[str], None]) -> None:
109        """Fires after the control is shown."""
110        self.add_event_handler('afterShow', handler)
111
112    def on_after_validate(self, handler: Callable[[str, bool], None]) -> None:
113        """Fires after the control value is validated."""
114        self.add_event_handler('afterValidate', handler)
115
116    def on_before_change(self, handler: Callable[[str], Union[bool, None]]) -> None:
117        """Fires before changing the value of the control."""
118        def event_handler(value):
119            result = handler(value)
120            if result is False:
121                return js.Boolean(False)
122        self.colorpicker.events.on('beforeChange', create_proxy(event_handler))
123
124    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
125        """Fires before configuration attributes are changed dynamically."""
126        def event_handler(properties):
127            result = handler(properties.to_py())
128            if result is False:
129                return js.Boolean(False)
130        self.colorpicker.events.on('beforeChangeProperties', create_proxy(event_handler))
131
132    def on_before_hide(self, handler: Callable[[str, bool], Union[bool, None]]) -> None:
133        """Fires before the control is hidden."""
134        def event_handler(value, init):
135            result = handler(value, init)
136            if result is False:
137                return js.Boolean(False)
138        self.colorpicker.events.on('beforeHide', create_proxy(event_handler))
139
140    def on_before_show(self, handler: Callable[[str], Union[bool, None]]) -> None:
141        """Fires before the control is shown."""
142        def event_handler(value):
143            result = handler(value)
144            if result is False:
145                return js.Boolean(False)
146        self.colorpicker.events.on('beforeShow', create_proxy(event_handler))
147
148    def on_before_validate(self, handler: Callable[[str], Union[bool, None]]) -> None:
149        """Fires before the control value is validated."""
150        def event_handler(value):
151            result = handler(value)
152            if result is False:
153                return js.Boolean(False)
154        self.colorpicker.events.on('beforeValidate', create_proxy(event_handler))
155
156    def on_blur(self, handler: Callable[[str], None]) -> None:
157        """Fires when the control has lost focus."""
158        self.add_event_handler('blur', handler)
159
160    def on_change(self, handler: Callable[[str], None]) -> None:
161        """Fires on changing the value of the control."""
162        self.add_event_handler('change', handler)
163
164    def on_focus(self, handler: Callable[[str], None]) -> None:
165        """Fires when the control has received focus."""
166        self.add_event_handler('focus', handler)
167
168    def on_input(self, handler: Callable[[str], None]) -> None:
169        """Fires when a user enters the value manually."""
170        self.add_event_handler('input', handler)
171
172    def on_keydown(self, handler: Callable[[Any], None]) -> None:
173        """Fires when any key is pressed and the control is in focus."""
174        self.add_event_handler('keydown', handler)
Colorpicker( config: ColorpickerConfig = None, widget_parent: Any = None)
16    def __init__(self, config: ColorpickerConfig = None, widget_parent: Any = None):
17        """Initializes the ColorPicker control."""
18        if config is None:
19            config = ColorPickerConfig()
20        config_dict = config.to_dict()
21        self.colorpicker = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the ColorPicker control.

colorpicker

ColorPicker API Functions

def blur(self) -> None:
25    def blur(self) -> None:
26        """Removes focus from the ColorPicker control."""
27        self.colorpicker.blur()

Removes focus from the ColorPicker control.

def clear(self) -> None:
29    def clear(self) -> None:
30        """Clears the value of the ColorPicker control."""
31        self.colorpicker.clear()

Clears the value of the ColorPicker control.

def clear_validate(self) -> None:
33    def clear_validate(self) -> None:
34        """Clears validation of the ColorPicker control."""
35        self.colorpicker.clearValidate()

Clears validation of the ColorPicker control.

def destructor(self) -> None:
37    def destructor(self) -> None:
38        """Removes the ColorPicker instance and releases the occupied resources."""
39        self.colorpicker.destructor()

Removes the ColorPicker instance and releases the occupied resources.

def disable(self) -> None:
41    def disable(self) -> None:
42        """Disables the ColorPicker control."""
43        self.colorpicker.disable()

Disables the ColorPicker control.

def enable(self) -> None:
45    def enable(self) -> None:
46        """Enables the ColorPicker control."""
47        self.colorpicker.enable()

Enables the ColorPicker control.

def focus(self) -> None:
49    def focus(self) -> None:
50        """Sets focus to the ColorPicker control."""
51        self.colorpicker.focus()

Sets focus to the ColorPicker control.

def get_properties(self) -> Dict[str, Any]:
53    def get_properties(self) -> Dict[str, Any]:
54        """Returns the configuration attributes of the control."""
55        return self.colorpicker.getProperties().to_py()

Returns the configuration attributes of the control.

def get_value(self) -> str:
57    def get_value(self) -> str:
58        """Returns the current value of the ColorPicker control (in Hex format)."""
59        return self.colorpicker.getValue()

Returns the current value of the ColorPicker control (in Hex format).

def get_widget(self) -> Any:
61    def get_widget(self) -> Any:
62        """Returns the DHTMLX ColorPicker widget attached to the control."""
63        return self.colorpicker.getWidget()

Returns the DHTMLX ColorPicker widget attached to the control.

def hide(self) -> None:
65    def hide(self) -> None:
66        """Hides the ColorPicker control."""
67        self.colorpicker.hide()

Hides the ColorPicker control.

def is_disabled(self) -> bool:
69    def is_disabled(self) -> bool:
70        """Checks whether the ColorPicker control is disabled."""
71        return self.colorpicker.isDisabled()

Checks whether the ColorPicker control is disabled.

def is_visible(self) -> bool:
73    def is_visible(self) -> bool:
74        """Checks whether the ColorPicker control is visible on the page."""
75        return self.colorpicker.isVisible()

Checks whether the ColorPicker control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
77    def set_properties(self, properties: Dict[str, Any]) -> None:
78        """Allows changing configuration attributes of the control dynamically."""
79        self.colorpicker.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def set_value(self, value: str) -> None:
81    def set_value(self, value: str) -> None:
82        """Sets the value for the ColorPicker control (Hex format)."""
83        self.colorpicker.setValue(value)

Sets the value for the ColorPicker control (Hex format).

def show(self) -> None:
85    def show(self) -> None:
86        """Shows the ColorPicker control on the page."""
87        self.colorpicker.show()

Shows the ColorPicker control on the page.

def validate(self, silent: bool = False, validate_value: str = None) -> bool:
89    def validate(self, silent: bool = False, validate_value: str = None) -> bool:
90        """Validates the ColorPicker control."""
91        return self.colorpicker.validate(silent, validate_value)

Validates the ColorPicker control.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
95    def add_event_handler(self, event_name: str, handler: Callable) -> None:
96        """Helper to add event handlers dynamically."""
97        event_proxy = create_proxy(handler)
98        self.colorpicker.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
100    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
101        """Fires after configuration attributes have been changed dynamically."""
102        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[str, bool], NoneType]) -> None:
104    def on_after_hide(self, handler: Callable[[str, bool], None]) -> None:
105        """Fires after the control is hidden."""
106        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show(self, handler: Callable[[str], NoneType]) -> None:
108    def on_after_show(self, handler: Callable[[str], None]) -> None:
109        """Fires after the control is shown."""
110        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_after_validate(self, handler: Callable[[str, bool], NoneType]) -> None:
112    def on_after_validate(self, handler: Callable[[str, bool], None]) -> None:
113        """Fires after the control value is validated."""
114        self.add_event_handler('afterValidate', handler)

Fires after the control value is validated.

def on_before_change(self, handler: Callable[[str], Optional[bool]]) -> None:
116    def on_before_change(self, handler: Callable[[str], Union[bool, None]]) -> None:
117        """Fires before changing the value of the control."""
118        def event_handler(value):
119            result = handler(value)
120            if result is False:
121                return js.Boolean(False)
122        self.colorpicker.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
124    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
125        """Fires before configuration attributes are changed dynamically."""
126        def event_handler(properties):
127            result = handler(properties.to_py())
128            if result is False:
129                return js.Boolean(False)
130        self.colorpicker.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide(self, handler: Callable[[str, bool], Optional[bool]]) -> None:
132    def on_before_hide(self, handler: Callable[[str, bool], Union[bool, None]]) -> None:
133        """Fires before the control is hidden."""
134        def event_handler(value, init):
135            result = handler(value, init)
136            if result is False:
137                return js.Boolean(False)
138        self.colorpicker.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show(self, handler: Callable[[str], Optional[bool]]) -> None:
140    def on_before_show(self, handler: Callable[[str], Union[bool, None]]) -> None:
141        """Fires before the control is shown."""
142        def event_handler(value):
143            result = handler(value)
144            if result is False:
145                return js.Boolean(False)
146        self.colorpicker.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

def on_before_validate(self, handler: Callable[[str], Optional[bool]]) -> None:
148    def on_before_validate(self, handler: Callable[[str], Union[bool, None]]) -> None:
149        """Fires before the control value is validated."""
150        def event_handler(value):
151            result = handler(value)
152            if result is False:
153                return js.Boolean(False)
154        self.colorpicker.events.on('beforeValidate', create_proxy(event_handler))

Fires before the control value is validated.

def on_blur(self, handler: Callable[[str], NoneType]) -> None:
156    def on_blur(self, handler: Callable[[str], None]) -> None:
157        """Fires when the control has lost focus."""
158        self.add_event_handler('blur', handler)

Fires when the control has lost focus.

def on_change(self, handler: Callable[[str], NoneType]) -> None:
160    def on_change(self, handler: Callable[[str], None]) -> None:
161        """Fires on changing the value of the control."""
162        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_focus(self, handler: Callable[[str], NoneType]) -> None:
164    def on_focus(self, handler: Callable[[str], None]) -> None:
165        """Fires when the control has received focus."""
166        self.add_event_handler('focus', handler)

Fires when the control has received focus.

def on_input(self, handler: Callable[[str], NoneType]) -> None:
168    def on_input(self, handler: Callable[[str], None]) -> None:
169        """Fires when a user enters the value manually."""
170        self.add_event_handler('input', handler)

Fires when a user enters the value manually.

def on_keydown(self, handler: Callable[[Any], NoneType]) -> None:
172    def on_keydown(self, handler: Callable[[Any], None]) -> None:
173        """Fires when any key is pressed and the control is in focus."""
174        self.add_event_handler('keydown', handler)

Fires when any key is pressed and the control is in focus.

class Combo:
 14class Combo:
 15    def __init__(self, config: ComboConfig = None, widget_parent: Any = None):
 16        """Initializes the Combo control."""
 17        if config is None:
 18            config = ComboConfig()
 19        config_dict = config.to_dict()
 20        self.combo = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ Combo API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from the Combo control."""
 26        self.combo.blur()
 27
 28    def clear(self) -> None:
 29        """Clears the value of the Combo control."""
 30        self.combo.clear()
 31
 32    def clear_validate(self) -> None:
 33        """Clears validation of the Combo control."""
 34        self.combo.clearValidate()
 35
 36    def destructor(self) -> None:
 37        """Removes the Combo instance and releases the occupied resources."""
 38        self.combo.destructor()
 39
 40    def disable(self) -> None:
 41        """Disables the Combo control."""
 42        self.combo.disable()
 43
 44    def enable(self) -> None:
 45        """Enables the Combo control."""
 46        self.combo.enable()
 47
 48    def focus(self) -> None:
 49        """Sets focus to the Combo control."""
 50        self.combo.focus()
 51
 52    def get_properties(self) -> Dict[str, Any]:
 53        """Returns the configuration attributes of the control."""
 54        return self.combo.getProperties().to_py()
 55
 56    def get_value(self) -> Union[str, int, List[Union[str, int]]]:
 57        """Returns IDs of options which are currently selected in the Combo control."""
 58        value = self.combo.getValue()
 59        if isinstance(value, js.JsProxy):
 60            return value.to_py()
 61        else:
 62            return value
 63
 64    def get_widget(self) -> Any:
 65        """Returns the ComboBox widget attached to the Combo control."""
 66        return self.combo.getWidget()
 67
 68    def hide(self) -> None:
 69        """Hides the Combo control."""
 70        self.combo.hide()
 71
 72    def is_disabled(self) -> bool:
 73        """Checks whether the Combo control is disabled."""
 74        return self.combo.isDisabled()
 75
 76    def is_visible(self) -> bool:
 77        """Checks whether the Combo control is visible on the page."""
 78        return self.combo.isVisible()
 79
 80    def set_properties(self, properties: Dict[str, Any]) -> None:
 81        """Allows changing configuration attributes of the control dynamically."""
 82        self.combo.setProperties(js.JSON.parse(json.dumps(properties)))
 83
 84    def set_value(self, ids: Union[str, int, List[Union[str, int]]]) -> None:
 85        """Sets the value for the Combo control."""
 86        self.combo.setValue(ids)
 87
 88    def show(self) -> None:
 89        """Shows the Combo control on the page."""
 90        self.combo.show()
 91
 92    def validate(self, silent: bool = False, validate_value: Union[str, List[str]] = None) -> bool:
 93        """Validates the Combo control."""
 94        return self.combo.validate(silent, validate_value)
 95
 96    """ Combo Events """
 97
 98    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 99        """Helper to add event handlers dynamically."""
100        event_proxy = create_proxy(handler)
101        self.combo.events.on(event_name, event_proxy)
102
103    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
104        """Fires after configuration attributes have been changed dynamically."""
105        self.add_event_handler('afterChangeProperties', handler)
106
107    def on_after_hide(self, handler: Callable[[Union[str, int, List[Union[str, int]]], bool], None]) -> None:
108        """Fires after the control is hidden."""
109        self.add_event_handler('afterHide', handler)
110
111    def on_after_show(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], None]) -> None:
112        """Fires after the control is shown."""
113        self.add_event_handler('afterShow', handler)
114
115    def on_after_validate(self, handler: Callable[[Union[str, int, List[Union[str, int]]], bool], None]) -> None:
116        """Fires after the control value is validated."""
117        self.add_event_handler('afterValidate', handler)
118
119    def on_before_change(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], Union[bool, None]]) -> None:
120        """Fires before changing the value of the control."""
121        def event_handler(ids):
122            result = handler(ids.to_py() if isinstance(ids, js.JsProxy) else ids)
123            if result is False:
124                return js.Boolean(False)
125        self.combo.events.on('beforeChange', create_proxy(event_handler))
126
127    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
128        """Fires before configuration attributes are changed dynamically."""
129        def event_handler(properties):
130            result = handler(properties.to_py())
131            if result is False:
132                return js.Boolean(False)
133        self.combo.events.on('beforeChangeProperties', create_proxy(event_handler))
134
135    def on_before_hide(self, handler: Callable[[Union[str, int, List[Union[str, int]]], bool], Union[bool, None]]) -> None:
136        """Fires before the control is hidden."""
137        def event_handler(ids, init):
138            result = handler(ids.to_py() if isinstance(ids, js.JsProxy) else ids, init)
139            if result is False:
140                return js.Boolean(False)
141        self.combo.events.on('beforeHide', create_proxy(event_handler))
142
143    def on_before_show(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], Union[bool, None]]) -> None:
144        """Fires before the control is shown."""
145        def event_handler(ids):
146            result = handler(ids.to_py() if isinstance(ids, js.JsProxy) else ids)
147            if result is False:
148                return js.Boolean(False)
149        self.combo.events.on('beforeShow', create_proxy(event_handler))
150
151    def on_before_validate(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], Union[bool, None]]) -> None:
152        """Fires before the control value is validated."""
153        def event_handler(ids):
154            result = handler(ids.to_py() if isinstance(ids, js.JsProxy) else ids)
155            if result is False:
156                return js.Boolean(False)
157        self.combo.events.on('beforeValidate', create_proxy(event_handler))
158
159    def on_blur(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], None]) -> None:
160        """Fires when the control has lost focus."""
161        self.add_event_handler('blur', handler)
162
163    def on_change(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], None]) -> None:
164        """Fires on changing the value of the control."""
165        self.add_event_handler('change', handler)
166
167    def on_focus(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], None]) -> None:
168        """Fires when the control has received focus."""
169        self.add_event_handler('focus', handler)
170
171    def on_keydown(self, handler: Callable[[Any, Union[str, int, None]], None]) -> None:
172        """Fires when any key is pressed and an option is in focus."""
173        self.add_event_handler('keydown', handler)
Combo( config: ComboConfig = None, widget_parent: Any = None)
15    def __init__(self, config: ComboConfig = None, widget_parent: Any = None):
16        """Initializes the Combo control."""
17        if config is None:
18            config = ComboConfig()
19        config_dict = config.to_dict()
20        self.combo = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Combo control.

combo

Combo API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from the Combo control."""
26        self.combo.blur()

Removes focus from the Combo control.

def clear(self) -> None:
28    def clear(self) -> None:
29        """Clears the value of the Combo control."""
30        self.combo.clear()

Clears the value of the Combo control.

def clear_validate(self) -> None:
32    def clear_validate(self) -> None:
33        """Clears validation of the Combo control."""
34        self.combo.clearValidate()

Clears validation of the Combo control.

def destructor(self) -> None:
36    def destructor(self) -> None:
37        """Removes the Combo instance and releases the occupied resources."""
38        self.combo.destructor()

Removes the Combo instance and releases the occupied resources.

def disable(self) -> None:
40    def disable(self) -> None:
41        """Disables the Combo control."""
42        self.combo.disable()

Disables the Combo control.

def enable(self) -> None:
44    def enable(self) -> None:
45        """Enables the Combo control."""
46        self.combo.enable()

Enables the Combo control.

def focus(self) -> None:
48    def focus(self) -> None:
49        """Sets focus to the Combo control."""
50        self.combo.focus()

Sets focus to the Combo control.

def get_properties(self) -> Dict[str, Any]:
52    def get_properties(self) -> Dict[str, Any]:
53        """Returns the configuration attributes of the control."""
54        return self.combo.getProperties().to_py()

Returns the configuration attributes of the control.

def get_value(self) -> Union[str, int, List[Union[str, int]]]:
56    def get_value(self) -> Union[str, int, List[Union[str, int]]]:
57        """Returns IDs of options which are currently selected in the Combo control."""
58        value = self.combo.getValue()
59        if isinstance(value, js.JsProxy):
60            return value.to_py()
61        else:
62            return value

Returns IDs of options which are currently selected in the Combo control.

def get_widget(self) -> Any:
64    def get_widget(self) -> Any:
65        """Returns the ComboBox widget attached to the Combo control."""
66        return self.combo.getWidget()

Returns the ComboBox widget attached to the Combo control.

def hide(self) -> None:
68    def hide(self) -> None:
69        """Hides the Combo control."""
70        self.combo.hide()

Hides the Combo control.

def is_disabled(self) -> bool:
72    def is_disabled(self) -> bool:
73        """Checks whether the Combo control is disabled."""
74        return self.combo.isDisabled()

Checks whether the Combo control is disabled.

def is_visible(self) -> bool:
76    def is_visible(self) -> bool:
77        """Checks whether the Combo control is visible on the page."""
78        return self.combo.isVisible()

Checks whether the Combo control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
80    def set_properties(self, properties: Dict[str, Any]) -> None:
81        """Allows changing configuration attributes of the control dynamically."""
82        self.combo.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def set_value(self, ids: Union[str, int, List[Union[str, int]]]) -> None:
84    def set_value(self, ids: Union[str, int, List[Union[str, int]]]) -> None:
85        """Sets the value for the Combo control."""
86        self.combo.setValue(ids)

Sets the value for the Combo control.

def show(self) -> None:
88    def show(self) -> None:
89        """Shows the Combo control on the page."""
90        self.combo.show()

Shows the Combo control on the page.

def validate( self, silent: bool = False, validate_value: Union[str, List[str]] = None) -> bool:
92    def validate(self, silent: bool = False, validate_value: Union[str, List[str]] = None) -> bool:
93        """Validates the Combo control."""
94        return self.combo.validate(silent, validate_value)

Validates the Combo control.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
 98    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 99        """Helper to add event handlers dynamically."""
100        event_proxy = create_proxy(handler)
101        self.combo.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
103    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
104        """Fires after configuration attributes have been changed dynamically."""
105        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide( self, handler: Callable[[Union[str, int, List[Union[str, int]]], bool], NoneType]) -> None:
107    def on_after_hide(self, handler: Callable[[Union[str, int, List[Union[str, int]]], bool], None]) -> None:
108        """Fires after the control is hidden."""
109        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show( self, handler: Callable[[Union[str, int, List[Union[str, int]]]], NoneType]) -> None:
111    def on_after_show(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], None]) -> None:
112        """Fires after the control is shown."""
113        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_after_validate( self, handler: Callable[[Union[str, int, List[Union[str, int]]], bool], NoneType]) -> None:
115    def on_after_validate(self, handler: Callable[[Union[str, int, List[Union[str, int]]], bool], None]) -> None:
116        """Fires after the control value is validated."""
117        self.add_event_handler('afterValidate', handler)

Fires after the control value is validated.

def on_before_change( self, handler: Callable[[Union[str, int, List[Union[str, int]]]], Optional[bool]]) -> None:
119    def on_before_change(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], Union[bool, None]]) -> None:
120        """Fires before changing the value of the control."""
121        def event_handler(ids):
122            result = handler(ids.to_py() if isinstance(ids, js.JsProxy) else ids)
123            if result is False:
124                return js.Boolean(False)
125        self.combo.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
127    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
128        """Fires before configuration attributes are changed dynamically."""
129        def event_handler(properties):
130            result = handler(properties.to_py())
131            if result is False:
132                return js.Boolean(False)
133        self.combo.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide( self, handler: Callable[[Union[str, int, List[Union[str, int]]], bool], Optional[bool]]) -> None:
135    def on_before_hide(self, handler: Callable[[Union[str, int, List[Union[str, int]]], bool], Union[bool, None]]) -> None:
136        """Fires before the control is hidden."""
137        def event_handler(ids, init):
138            result = handler(ids.to_py() if isinstance(ids, js.JsProxy) else ids, init)
139            if result is False:
140                return js.Boolean(False)
141        self.combo.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show( self, handler: Callable[[Union[str, int, List[Union[str, int]]]], Optional[bool]]) -> None:
143    def on_before_show(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], Union[bool, None]]) -> None:
144        """Fires before the control is shown."""
145        def event_handler(ids):
146            result = handler(ids.to_py() if isinstance(ids, js.JsProxy) else ids)
147            if result is False:
148                return js.Boolean(False)
149        self.combo.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

def on_before_validate( self, handler: Callable[[Union[str, int, List[Union[str, int]]]], Optional[bool]]) -> None:
151    def on_before_validate(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], Union[bool, None]]) -> None:
152        """Fires before the control value is validated."""
153        def event_handler(ids):
154            result = handler(ids.to_py() if isinstance(ids, js.JsProxy) else ids)
155            if result is False:
156                return js.Boolean(False)
157        self.combo.events.on('beforeValidate', create_proxy(event_handler))

Fires before the control value is validated.

def on_blur( self, handler: Callable[[Union[str, int, List[Union[str, int]]]], NoneType]) -> None:
159    def on_blur(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], None]) -> None:
160        """Fires when the control has lost focus."""
161        self.add_event_handler('blur', handler)

Fires when the control has lost focus.

def on_change( self, handler: Callable[[Union[str, int, List[Union[str, int]]]], NoneType]) -> None:
163    def on_change(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], None]) -> None:
164        """Fires on changing the value of the control."""
165        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_focus( self, handler: Callable[[Union[str, int, List[Union[str, int]]]], NoneType]) -> None:
167    def on_focus(self, handler: Callable[[Union[str, int, List[Union[str, int]]]], None]) -> None:
168        """Fires when the control has received focus."""
169        self.add_event_handler('focus', handler)

Fires when the control has received focus.

def on_keydown( self, handler: Callable[[Any, Union[str, int, NoneType]], NoneType]) -> None:
171    def on_keydown(self, handler: Callable[[Any, Union[str, int, None]], None]) -> None:
172        """Fires when any key is pressed and an option is in focus."""
173        self.add_event_handler('keydown', handler)

Fires when any key is pressed and an option is in focus.

class Container:
 14class Container:
 15    def __init__(self, config: ContainerConfig = None, widget_parent: Any = None):
 16        """Initializes the Container control."""
 17        if config is None:
 18            config = ContainerConfig()
 19        config_dict = config.to_dict()
 20        self.container = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ Container API Functions """
 23
 24    def attach(self, widget: Any) -> None:
 25        """Attaches a DHTMLX widget into the Container control."""
 26        self.container.attach(widget)
 27
 28    def attach_html(self, html: str) -> None:
 29        """Attaches an HTML content into the Container control."""
 30        self.container.attachHTML(html)
 31
 32    def disable(self) -> None:
 33        """Disables the Container control."""
 34        self.container.disable()
 35
 36    def enable(self) -> None:
 37        """Enables the Container control."""
 38        self.container.enable()
 39
 40    def get_properties(self) -> Dict[str, Any]:
 41        """Returns the configuration properties of the control."""
 42        return self.container.getProperties().to_py()
 43
 44    def hide(self) -> None:
 45        """Hides the Container control."""
 46        self.container.hide()
 47
 48    def is_disabled(self) -> bool:
 49        """Checks whether the Container control is disabled."""
 50        return self.container.isDisabled()
 51
 52    def is_visible(self) -> bool:
 53        """Checks whether the Container control is visible on the page."""
 54        return self.container.isVisible()
 55
 56    def set_properties(self, properties: Dict[str, Any]) -> None:
 57        """Allows changing configuration properties of the control dynamically."""
 58        self.container.setProperties(js.JSON.parse(json.dumps(properties)))
 59
 60    def show(self) -> None:
 61        """Shows the Container control on the page."""
 62        self.container.show()
 63
 64    """ Container Events """
 65
 66    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 67        """Helper to add event handlers dynamically."""
 68        event_proxy = create_proxy(handler)
 69        self.container.events.on(event_name, event_proxy)
 70
 71    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
 72        """Fires after properties have been changed dynamically."""
 73        self.add_event_handler('afterChangeProperties', handler)
 74
 75    def on_after_hide(self, handler: Callable[[bool], None]) -> None:
 76        """Fires after the control is hidden."""
 77        self.add_event_handler('afterHide', handler)
 78
 79    def on_after_show(self, handler: Callable[[], None]) -> None:
 80        """Fires after the control is shown."""
 81        self.add_event_handler('afterShow', handler)
 82
 83    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
 84        """Fires before properties are changed dynamically."""
 85        def event_handler(properties):
 86            result = handler(properties.to_py())
 87            if result is False:
 88                return js.Boolean(False)
 89        self.container.events.on('beforeChangeProperties', create_proxy(event_handler))
 90
 91    def on_before_hide(self, handler: Callable[[bool], Union[bool, None]]) -> None:
 92        """Fires before the control is hidden."""
 93        def event_handler(init):
 94            result = handler(init)
 95            if result is False:
 96                return js.Boolean(False)
 97        self.container.events.on('beforeHide', create_proxy(event_handler))
 98
 99    def on_before_show(self, handler: Callable[[], Union[bool, None]]) -> None:
100        """Fires before the control is shown."""
101        def event_handler():
102            result = handler()
103            if result is False:
104                return js.Boolean(False)
105        self.container.events.on('beforeShow', create_proxy(event_handler))
Container( config: ContainerConfig = None, widget_parent: Any = None)
15    def __init__(self, config: ContainerConfig = None, widget_parent: Any = None):
16        """Initializes the Container control."""
17        if config is None:
18            config = ContainerConfig()
19        config_dict = config.to_dict()
20        self.container = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Container control.

container

Container API Functions

def attach(self, widget: Any) -> None:
24    def attach(self, widget: Any) -> None:
25        """Attaches a DHTMLX widget into the Container control."""
26        self.container.attach(widget)

Attaches a DHTMLX widget into the Container control.

def attach_html(self, html: str) -> None:
28    def attach_html(self, html: str) -> None:
29        """Attaches an HTML content into the Container control."""
30        self.container.attachHTML(html)

Attaches an HTML content into the Container control.

def disable(self) -> None:
32    def disable(self) -> None:
33        """Disables the Container control."""
34        self.container.disable()

Disables the Container control.

def enable(self) -> None:
36    def enable(self) -> None:
37        """Enables the Container control."""
38        self.container.enable()

Enables the Container control.

def get_properties(self) -> Dict[str, Any]:
40    def get_properties(self) -> Dict[str, Any]:
41        """Returns the configuration properties of the control."""
42        return self.container.getProperties().to_py()

Returns the configuration properties of the control.

def hide(self) -> None:
44    def hide(self) -> None:
45        """Hides the Container control."""
46        self.container.hide()

Hides the Container control.

def is_disabled(self) -> bool:
48    def is_disabled(self) -> bool:
49        """Checks whether the Container control is disabled."""
50        return self.container.isDisabled()

Checks whether the Container control is disabled.

def is_visible(self) -> bool:
52    def is_visible(self) -> bool:
53        """Checks whether the Container control is visible on the page."""
54        return self.container.isVisible()

Checks whether the Container control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
56    def set_properties(self, properties: Dict[str, Any]) -> None:
57        """Allows changing configuration properties of the control dynamically."""
58        self.container.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration properties of the control dynamically.

def show(self) -> None:
60    def show(self) -> None:
61        """Shows the Container control on the page."""
62        self.container.show()

Shows the Container control on the page.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
66    def add_event_handler(self, event_name: str, handler: Callable) -> None:
67        """Helper to add event handlers dynamically."""
68        event_proxy = create_proxy(handler)
69        self.container.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
71    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
72        """Fires after properties have been changed dynamically."""
73        self.add_event_handler('afterChangeProperties', handler)

Fires after properties have been changed dynamically.

def on_after_hide(self, handler: Callable[[bool], NoneType]) -> None:
75    def on_after_hide(self, handler: Callable[[bool], None]) -> None:
76        """Fires after the control is hidden."""
77        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show(self, handler: Callable[[], NoneType]) -> None:
79    def on_after_show(self, handler: Callable[[], None]) -> None:
80        """Fires after the control is shown."""
81        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
83    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
84        """Fires before properties are changed dynamically."""
85        def event_handler(properties):
86            result = handler(properties.to_py())
87            if result is False:
88                return js.Boolean(False)
89        self.container.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before properties are changed dynamically.

def on_before_hide(self, handler: Callable[[bool], Optional[bool]]) -> None:
91    def on_before_hide(self, handler: Callable[[bool], Union[bool, None]]) -> None:
92        """Fires before the control is hidden."""
93        def event_handler(init):
94            result = handler(init)
95            if result is False:
96                return js.Boolean(False)
97        self.container.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show(self, handler: Callable[[], Optional[bool]]) -> None:
 99    def on_before_show(self, handler: Callable[[], Union[bool, None]]) -> None:
100        """Fires before the control is shown."""
101        def event_handler():
102            result = handler()
103            if result is False:
104                return js.Boolean(False)
105        self.container.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

class Datepicker:
 14class Datepicker:
 15    def __init__(self, config: DatepickerConfig = None, widget_parent: Any = None):
 16        """Initializes the DatePicker control."""
 17        if config is None:
 18            config = DatePickerConfig()
 19        config_dict = config.to_dict()
 20        self.datepicker = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ DatePicker API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from the DatePicker control."""
 26        self.datepicker.blur()
 27
 28    def clear(self) -> None:
 29        """Clears the value of the DatePicker control."""
 30        self.datepicker.clear()
 31
 32    def clear_validate(self) -> None:
 33        """Clears validation of the DatePicker control."""
 34        self.datepicker.clearValidate()
 35
 36    def destructor(self) -> None:
 37        """Removes the DatePicker instance and releases the occupied resources."""
 38        self.datepicker.destructor()
 39
 40    def disable(self) -> None:
 41        """Disables the DatePicker control."""
 42        self.datepicker.disable()
 43
 44    def enable(self) -> None:
 45        """Enables the DatePicker control."""
 46        self.datepicker.enable()
 47
 48    def focus(self) -> None:
 49        """Sets focus to the DatePicker control."""
 50        self.datepicker.focus()
 51
 52    def get_properties(self) -> Dict[str, Any]:
 53        """Returns the configuration attributes of the control."""
 54        return self.datepicker.getProperties().to_py()
 55
 56    def get_value(self, as_date: bool = False) -> Union[str, Any]:
 57        """Returns the current value of the DatePicker control."""
 58        return self.datepicker.getValue(as_date)
 59
 60    def get_widget(self) -> Any:
 61        """Returns the DHTMLX Calendar widget attached to the DatePicker control."""
 62        return self.datepicker.getWidget()
 63
 64    def hide(self) -> None:
 65        """Hides the DatePicker control."""
 66        self.datepicker.hide()
 67
 68    def is_disabled(self) -> bool:
 69        """Checks whether the DatePicker control is disabled."""
 70        return self.datepicker.isDisabled()
 71
 72    def is_visible(self) -> bool:
 73        """Checks whether the DatePicker control is visible on the page."""
 74        return self.datepicker.isVisible()
 75
 76    def set_properties(self, properties: Dict[str, Any]) -> None:
 77        """Allows changing configuration attributes of the control dynamically."""
 78        self.datepicker.setProperties(js.JSON.parse(json.dumps(properties)))
 79
 80    def set_value(self, value: Union[str, Any]) -> None:
 81        """Sets a date in the DatePicker control."""
 82        self.datepicker.setValue(value)
 83
 84    def show(self) -> None:
 85        """Shows the DatePicker control on the page."""
 86        self.datepicker.show()
 87
 88    def validate(self, silent: bool = False, validate_value: Union[str, Any] = None) -> bool:
 89        """Validates the DatePicker control."""
 90        return self.datepicker.validate(silent, validate_value)
 91
 92    """ DatePicker Events """
 93
 94    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 95        """Helper to add event handlers dynamically."""
 96        event_proxy = create_proxy(handler)
 97        self.datepicker.events.on(event_name, event_proxy)
 98
 99    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
100        """Fires after configuration attributes have been changed dynamically."""
101        self.add_event_handler('afterChangeProperties', handler)
102
103    def on_after_hide(self, handler: Callable[[Union[str, Any], bool], None]) -> None:
104        """Fires after the control is hidden."""
105        self.add_event_handler('afterHide', handler)
106
107    def on_after_show(self, handler: Callable[[Union[str, Any]], None]) -> None:
108        """Fires after the control is shown."""
109        self.add_event_handler('afterShow', handler)
110
111    def on_after_validate(self, handler: Callable[[Union[str, Any], bool], None]) -> None:
112        """Fires after the control value is validated."""
113        self.add_event_handler('afterValidate', handler)
114
115    def on_before_change(self, handler: Callable[[Union[str, Any]], Union[bool, None]]) -> None:
116        """Fires before changing the value of the control."""
117        def event_handler(value):
118            result = handler(value)
119            if result is False:
120                return js.Boolean(False)
121        self.datepicker.events.on('beforeChange', create_proxy(event_handler))
122
123    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
124        """Fires before configuration attributes are changed dynamically."""
125        def event_handler(properties):
126            result = handler(properties.to_py())
127            if result is False:
128                return js.Boolean(False)
129        self.datepicker.events.on('beforeChangeProperties', create_proxy(event_handler))
130
131    def on_before_hide(self, handler: Callable[[Union[str, Any], bool], Union[bool, None]]) -> None:
132        """Fires before the control is hidden."""
133        def event_handler(value, init):
134            result = handler(value, init)
135            if result is False:
136                return js.Boolean(False)
137        self.datepicker.events.on('beforeHide', create_proxy(event_handler))
138
139    def on_before_show(self, handler: Callable[[Union[str, Any]], Union[bool, None]]) -> None:
140        """Fires before the control is shown."""
141        def event_handler(value):
142            result = handler(value)
143            if result is False:
144                return js.Boolean(False)
145        self.datepicker.events.on('beforeShow', create_proxy(event_handler))
146
147    def on_before_validate(self, handler: Callable[[Union[str, Any]], Union[bool, None]]) -> None:
148        """Fires before the control value is validated."""
149        def event_handler(value):
150            result = handler(value)
151            if result is False:
152                return js.Boolean(False)
153        self.datepicker.events.on('beforeValidate', create_proxy(event_handler))
154
155    def on_blur(self, handler: Callable[[Union[str, Any]], None]) -> None:
156        """Fires when the control has lost focus."""
157        self.add_event_handler('blur', handler)
158
159    def on_change(self, handler: Callable[[Union[str, Any]], None]) -> None:
160        """Fires on changing the value of the control."""
161        self.add_event_handler('change', handler)
162
163    def on_focus(self, handler: Callable[[Union[str, Any]], None]) -> None:
164        """Fires when the control has received focus."""
165        self.add_event_handler('focus', handler)
166
167    def on_input(self, handler: Callable[[str], None]) -> None:
168        """Fires when a user enters the value manually."""
169        self.add_event_handler('input', handler)
170
171    def on_keydown(self, handler: Callable[[Any], None]) -> None:
172        """Fires when any key is pressed and the control is in focus."""
173        self.add_event_handler('keydown', handler)
Datepicker( config: DatepickerConfig = None, widget_parent: Any = None)
15    def __init__(self, config: DatepickerConfig = None, widget_parent: Any = None):
16        """Initializes the DatePicker control."""
17        if config is None:
18            config = DatePickerConfig()
19        config_dict = config.to_dict()
20        self.datepicker = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the DatePicker control.

datepicker

DatePicker API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from the DatePicker control."""
26        self.datepicker.blur()

Removes focus from the DatePicker control.

def clear(self) -> None:
28    def clear(self) -> None:
29        """Clears the value of the DatePicker control."""
30        self.datepicker.clear()

Clears the value of the DatePicker control.

def clear_validate(self) -> None:
32    def clear_validate(self) -> None:
33        """Clears validation of the DatePicker control."""
34        self.datepicker.clearValidate()

Clears validation of the DatePicker control.

def destructor(self) -> None:
36    def destructor(self) -> None:
37        """Removes the DatePicker instance and releases the occupied resources."""
38        self.datepicker.destructor()

Removes the DatePicker instance and releases the occupied resources.

def disable(self) -> None:
40    def disable(self) -> None:
41        """Disables the DatePicker control."""
42        self.datepicker.disable()

Disables the DatePicker control.

def enable(self) -> None:
44    def enable(self) -> None:
45        """Enables the DatePicker control."""
46        self.datepicker.enable()

Enables the DatePicker control.

def focus(self) -> None:
48    def focus(self) -> None:
49        """Sets focus to the DatePicker control."""
50        self.datepicker.focus()

Sets focus to the DatePicker control.

def get_properties(self) -> Dict[str, Any]:
52    def get_properties(self) -> Dict[str, Any]:
53        """Returns the configuration attributes of the control."""
54        return self.datepicker.getProperties().to_py()

Returns the configuration attributes of the control.

def get_value(self, as_date: bool = False) -> Union[str, Any]:
56    def get_value(self, as_date: bool = False) -> Union[str, Any]:
57        """Returns the current value of the DatePicker control."""
58        return self.datepicker.getValue(as_date)

Returns the current value of the DatePicker control.

def get_widget(self) -> Any:
60    def get_widget(self) -> Any:
61        """Returns the DHTMLX Calendar widget attached to the DatePicker control."""
62        return self.datepicker.getWidget()

Returns the DHTMLX Calendar widget attached to the DatePicker control.

def hide(self) -> None:
64    def hide(self) -> None:
65        """Hides the DatePicker control."""
66        self.datepicker.hide()

Hides the DatePicker control.

def is_disabled(self) -> bool:
68    def is_disabled(self) -> bool:
69        """Checks whether the DatePicker control is disabled."""
70        return self.datepicker.isDisabled()

Checks whether the DatePicker control is disabled.

def is_visible(self) -> bool:
72    def is_visible(self) -> bool:
73        """Checks whether the DatePicker control is visible on the page."""
74        return self.datepicker.isVisible()

Checks whether the DatePicker control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
76    def set_properties(self, properties: Dict[str, Any]) -> None:
77        """Allows changing configuration attributes of the control dynamically."""
78        self.datepicker.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def set_value(self, value: Union[str, Any]) -> None:
80    def set_value(self, value: Union[str, Any]) -> None:
81        """Sets a date in the DatePicker control."""
82        self.datepicker.setValue(value)

Sets a date in the DatePicker control.

def show(self) -> None:
84    def show(self) -> None:
85        """Shows the DatePicker control on the page."""
86        self.datepicker.show()

Shows the DatePicker control on the page.

def validate( self, silent: bool = False, validate_value: Union[str, Any] = None) -> bool:
88    def validate(self, silent: bool = False, validate_value: Union[str, Any] = None) -> bool:
89        """Validates the DatePicker control."""
90        return self.datepicker.validate(silent, validate_value)

Validates the DatePicker control.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
94    def add_event_handler(self, event_name: str, handler: Callable) -> None:
95        """Helper to add event handlers dynamically."""
96        event_proxy = create_proxy(handler)
97        self.datepicker.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
 99    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
100        """Fires after configuration attributes have been changed dynamically."""
101        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[Union[str, Any], bool], NoneType]) -> None:
103    def on_after_hide(self, handler: Callable[[Union[str, Any], bool], None]) -> None:
104        """Fires after the control is hidden."""
105        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show(self, handler: Callable[[Union[str, Any]], NoneType]) -> None:
107    def on_after_show(self, handler: Callable[[Union[str, Any]], None]) -> None:
108        """Fires after the control is shown."""
109        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_after_validate(self, handler: Callable[[Union[str, Any], bool], NoneType]) -> None:
111    def on_after_validate(self, handler: Callable[[Union[str, Any], bool], None]) -> None:
112        """Fires after the control value is validated."""
113        self.add_event_handler('afterValidate', handler)

Fires after the control value is validated.

def on_before_change(self, handler: Callable[[Union[str, Any]], Optional[bool]]) -> None:
115    def on_before_change(self, handler: Callable[[Union[str, Any]], Union[bool, None]]) -> None:
116        """Fires before changing the value of the control."""
117        def event_handler(value):
118            result = handler(value)
119            if result is False:
120                return js.Boolean(False)
121        self.datepicker.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
123    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
124        """Fires before configuration attributes are changed dynamically."""
125        def event_handler(properties):
126            result = handler(properties.to_py())
127            if result is False:
128                return js.Boolean(False)
129        self.datepicker.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide(self, handler: Callable[[Union[str, Any], bool], Optional[bool]]) -> None:
131    def on_before_hide(self, handler: Callable[[Union[str, Any], bool], Union[bool, None]]) -> None:
132        """Fires before the control is hidden."""
133        def event_handler(value, init):
134            result = handler(value, init)
135            if result is False:
136                return js.Boolean(False)
137        self.datepicker.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show(self, handler: Callable[[Union[str, Any]], Optional[bool]]) -> None:
139    def on_before_show(self, handler: Callable[[Union[str, Any]], Union[bool, None]]) -> None:
140        """Fires before the control is shown."""
141        def event_handler(value):
142            result = handler(value)
143            if result is False:
144                return js.Boolean(False)
145        self.datepicker.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

def on_before_validate(self, handler: Callable[[Union[str, Any]], Optional[bool]]) -> None:
147    def on_before_validate(self, handler: Callable[[Union[str, Any]], Union[bool, None]]) -> None:
148        """Fires before the control value is validated."""
149        def event_handler(value):
150            result = handler(value)
151            if result is False:
152                return js.Boolean(False)
153        self.datepicker.events.on('beforeValidate', create_proxy(event_handler))

Fires before the control value is validated.

def on_blur(self, handler: Callable[[Union[str, Any]], NoneType]) -> None:
155    def on_blur(self, handler: Callable[[Union[str, Any]], None]) -> None:
156        """Fires when the control has lost focus."""
157        self.add_event_handler('blur', handler)

Fires when the control has lost focus.

def on_change(self, handler: Callable[[Union[str, Any]], NoneType]) -> None:
159    def on_change(self, handler: Callable[[Union[str, Any]], None]) -> None:
160        """Fires on changing the value of the control."""
161        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_focus(self, handler: Callable[[Union[str, Any]], NoneType]) -> None:
163    def on_focus(self, handler: Callable[[Union[str, Any]], None]) -> None:
164        """Fires when the control has received focus."""
165        self.add_event_handler('focus', handler)

Fires when the control has received focus.

def on_input(self, handler: Callable[[str], NoneType]) -> None:
167    def on_input(self, handler: Callable[[str], None]) -> None:
168        """Fires when a user enters the value manually."""
169        self.add_event_handler('input', handler)

Fires when a user enters the value manually.

def on_keydown(self, handler: Callable[[Any], NoneType]) -> None:
171    def on_keydown(self, handler: Callable[[Any], None]) -> None:
172        """Fires when any key is pressed and the control is in focus."""
173        self.add_event_handler('keydown', handler)

Fires when any key is pressed and the control is in focus.

class Fieldset:
14class Fieldset:
15    def __init__(self, config: FieldsetConfig = None, widget_parent: Any = None):
16        """Initializes the Fieldset control."""
17        if config is None:
18            config = FieldsetConfig()
19        config_dict = config.to_dict()
20        self.fieldset = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
21
22    """ Fieldset API Functions """
23
24    def destructor(self) -> None:
25        """Removes the Fieldset instance and releases the occupied resources."""
26        self.fieldset.destructor()
27
28    def disable(self) -> None:
29        """Disables the Fieldset control."""
30        self.fieldset.disable()
31
32    def enable(self) -> None:
33        """Enables the Fieldset control."""
34        self.fieldset.enable()
35
36    def for_each(self, callback: Callable[[Any, int, List[Any]], None], tree: bool = False) -> None:
37        """Allows iterating through all the nested items."""
38        def py_callback(item, index, array):
39            item_py = item.to_py()
40            array_py = array.to_py()
41            callback(item_py, index, array_py)
42        self.fieldset.forEach(create_proxy(py_callback), tree)
43
44    def get_properties(self) -> Dict[str, Any]:
45        """Returns the configuration attributes of the control."""
46        return self.fieldset.getProperties().to_py()
47
48    def hide(self) -> None:
49        """Hides the Fieldset control."""
50        self.fieldset.hide()
51
52    def is_disabled(self) -> bool:
53        """Checks whether the Fieldset control is disabled."""
54        return self.fieldset.isDisabled()
55
56    def is_visible(self) -> bool:
57        """Checks whether the Fieldset control is visible on the page."""
58        return self.fieldset.isVisible()
59
60    def set_properties(self, properties: Dict[str, Any]) -> None:
61        """Allows changing configuration attributes of the control dynamically."""
62        self.fieldset.setProperties(js.JSON.parse(json.dumps(properties)))
63
64    def show(self) -> None:
65        """Shows the Fieldset control on the page."""
66        self.fieldset.show()
67
68    """ Fieldset Events """
69
70    def add_event_handler(self, event_name: str, handler: Callable) -> None:
71        """Helper to add event handlers dynamically."""
72        event_proxy = create_proxy(handler)
73        self.fieldset.events.on(event_name, event_proxy)
74
75    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
76        """Fires after configuration attributes have been changed dynamically."""
77        self.add_event_handler('afterChangeProperties', handler)
78
79    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
80        """Fires before configuration attributes are changed dynamically."""
81        def event_handler(properties):
82            result = handler(properties.to_py())
83            if result is False:
84                return js.Boolean(False)
85        self.fieldset.events.on('beforeChangeProperties', create_proxy(event_handler))
Fieldset( config: FieldsetConfig = None, widget_parent: Any = None)
15    def __init__(self, config: FieldsetConfig = None, widget_parent: Any = None):
16        """Initializes the Fieldset control."""
17        if config is None:
18            config = FieldsetConfig()
19        config_dict = config.to_dict()
20        self.fieldset = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Fieldset control.

fieldset

Fieldset API Functions

def destructor(self) -> None:
24    def destructor(self) -> None:
25        """Removes the Fieldset instance and releases the occupied resources."""
26        self.fieldset.destructor()

Removes the Fieldset instance and releases the occupied resources.

def disable(self) -> None:
28    def disable(self) -> None:
29        """Disables the Fieldset control."""
30        self.fieldset.disable()

Disables the Fieldset control.

def enable(self) -> None:
32    def enable(self) -> None:
33        """Enables the Fieldset control."""
34        self.fieldset.enable()

Enables the Fieldset control.

def for_each( self, callback: Callable[[Any, int, List[Any]], NoneType], tree: bool = False) -> None:
36    def for_each(self, callback: Callable[[Any, int, List[Any]], None], tree: bool = False) -> None:
37        """Allows iterating through all the nested items."""
38        def py_callback(item, index, array):
39            item_py = item.to_py()
40            array_py = array.to_py()
41            callback(item_py, index, array_py)
42        self.fieldset.forEach(create_proxy(py_callback), tree)

Allows iterating through all the nested items.

def get_properties(self) -> Dict[str, Any]:
44    def get_properties(self) -> Dict[str, Any]:
45        """Returns the configuration attributes of the control."""
46        return self.fieldset.getProperties().to_py()

Returns the configuration attributes of the control.

def hide(self) -> None:
48    def hide(self) -> None:
49        """Hides the Fieldset control."""
50        self.fieldset.hide()

Hides the Fieldset control.

def is_disabled(self) -> bool:
52    def is_disabled(self) -> bool:
53        """Checks whether the Fieldset control is disabled."""
54        return self.fieldset.isDisabled()

Checks whether the Fieldset control is disabled.

def is_visible(self) -> bool:
56    def is_visible(self) -> bool:
57        """Checks whether the Fieldset control is visible on the page."""
58        return self.fieldset.isVisible()

Checks whether the Fieldset control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
60    def set_properties(self, properties: Dict[str, Any]) -> None:
61        """Allows changing configuration attributes of the control dynamically."""
62        self.fieldset.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def show(self) -> None:
64    def show(self) -> None:
65        """Shows the Fieldset control on the page."""
66        self.fieldset.show()

Shows the Fieldset control on the page.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
70    def add_event_handler(self, event_name: str, handler: Callable) -> None:
71        """Helper to add event handlers dynamically."""
72        event_proxy = create_proxy(handler)
73        self.fieldset.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
75    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
76        """Fires after configuration attributes have been changed dynamically."""
77        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
79    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
80        """Fires before configuration attributes are changed dynamically."""
81        def event_handler(properties):
82            result = handler(properties.to_py())
83            if result is False:
84                return js.Boolean(False)
85        self.fieldset.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

class Input:
 14class Input:
 15    def __init__(self, config: InputConfig = None, widget_parent: Any = None):
 16        """Initializes the Input control."""
 17        if config is None:
 18            config = InputConfig()
 19        config_dict = config.to_dict()
 20        self.input = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ Input API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from the Input control."""
 26        self.input.blur()
 27
 28    def clear(self) -> None:
 29        """Clears the value of the Input control."""
 30        self.input.clear()
 31
 32    def clear_validate(self) -> None:
 33        """Clears validation of the Input control."""
 34        self.input.clearValidate()
 35
 36    def destructor(self) -> None:
 37        """Removes the Input instance and releases the occupied resources."""
 38        self.input.destructor()
 39
 40    def disable(self) -> None:
 41        """Disables the Input control."""
 42        self.input.disable()
 43
 44    def enable(self) -> None:
 45        """Enables the Input control."""
 46        self.input.enable()
 47
 48    def focus(self) -> None:
 49        """Sets focus to the Input control."""
 50        self.input.focus()
 51
 52    def get_properties(self) -> Dict[str, Any]:
 53        """Returns the configuration attributes of the control."""
 54        return self.input.getProperties().to_py()
 55
 56    def get_value(self) -> Union[str, int]:
 57        """Returns the current value of the Input control."""
 58        return self.input.getValue()
 59
 60    def hide(self) -> None:
 61        """Hides the Input control."""
 62        self.input.hide()
 63
 64    def is_disabled(self) -> bool:
 65        """Checks whether the Input control is disabled."""
 66        return self.input.isDisabled()
 67
 68    def is_visible(self) -> bool:
 69        """Checks whether the Input control is visible on the page."""
 70        return self.input.isVisible()
 71
 72    def set_properties(self, properties: Dict[str, Any]) -> None:
 73        """Allows changing configuration attributes of the control dynamically."""
 74        self.input.setProperties(js.JSON.parse(json.dumps(properties)))
 75
 76    def set_value(self, value: Union[str, int]) -> None:
 77        """Sets the value for the Input control."""
 78        self.input.setValue(value)
 79
 80    def show(self) -> None:
 81        """Shows the Input control on the page."""
 82        self.input.show()
 83
 84    def validate(self, silent: bool = False, validate_value: Union[str, int] = None) -> bool:
 85        """Validates the Input control."""
 86        return self.input.validate(silent, validate_value)
 87
 88    """ Input Events """
 89
 90    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 91        """Helper to add event handlers dynamically."""
 92        event_proxy = create_proxy(handler)
 93        self.input.events.on(event_name, event_proxy)
 94
 95    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
 96        """Fires after configuration attributes have been changed dynamically."""
 97        self.add_event_handler('afterChangeProperties', handler)
 98
 99    def on_after_hide(self, handler: Callable[[Union[str, int], bool], None]) -> None:
100        """Fires after the control is hidden."""
101        self.add_event_handler('afterHide', handler)
102
103    def on_after_show(self, handler: Callable[[Union[str, int]], None]) -> None:
104        """Fires after the control is shown."""
105        self.add_event_handler('afterShow', handler)
106
107    def on_after_validate(self, handler: Callable[[Union[str, int], bool], None]) -> None:
108        """Fires after the control value is validated."""
109        self.add_event_handler('afterValidate', handler)
110
111    def on_before_change(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
112        """Fires before changing the value of the control."""
113        def event_handler(value):
114            result = handler(value)
115            if result is False:
116                return js.Boolean(False)
117        self.input.events.on('beforeChange', create_proxy(event_handler))
118
119    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
120        """Fires before configuration attributes are changed dynamically."""
121        def event_handler(properties):
122            result = handler(properties.to_py())
123            if result is False:
124                return js.Boolean(False)
125        self.input.events.on('beforeChangeProperties', create_proxy(event_handler))
126
127    def on_before_hide(self, handler: Callable[[Union[str, int], bool], Union[bool, None]]) -> None:
128        """Fires before the control is hidden."""
129        def event_handler(value, init):
130            result = handler(value, init)
131            if result is False:
132                return js.Boolean(False)
133        self.input.events.on('beforeHide', create_proxy(event_handler))
134
135    def on_before_show(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
136        """Fires before the control is shown."""
137        def event_handler(value):
138            result = handler(value)
139            if result is False:
140                return js.Boolean(False)
141        self.input.events.on('beforeShow', create_proxy(event_handler))
142
143    def on_before_validate(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
144        """Fires before the control value is validated."""
145        def event_handler(value):
146            result = handler(value)
147            if result is False:
148                return js.Boolean(False)
149        self.input.events.on('beforeValidate', create_proxy(event_handler))
150
151    def on_blur(self, handler: Callable[[Union[str, int]], None]) -> None:
152        """Fires when the control has lost focus."""
153        self.add_event_handler('blur', handler)
154
155    def on_change(self, handler: Callable[[Union[str, int]], None]) -> None:
156        """Fires on changing the value of the control."""
157        self.add_event_handler('change', handler)
158
159    def on_focus(self, handler: Callable[[Union[str, int]], None]) -> None:
160        """Fires when the control has received focus."""
161        self.add_event_handler('focus', handler)
162
163    def on_input(self, handler: Callable[[Union[str, int]], None]) -> None:
164        """Fires when a user types some text in the input."""
165        self.add_event_handler('input', handler)
166
167    def on_keydown(self, handler: Callable[[Any], None]) -> None:
168        """Fires when any key is pressed and the control is in focus."""
169        self.add_event_handler('keydown', handler)
Input( config: InputConfig = None, widget_parent: Any = None)
15    def __init__(self, config: InputConfig = None, widget_parent: Any = None):
16        """Initializes the Input control."""
17        if config is None:
18            config = InputConfig()
19        config_dict = config.to_dict()
20        self.input = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Input control.

input

Input API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from the Input control."""
26        self.input.blur()

Removes focus from the Input control.

def clear(self) -> None:
28    def clear(self) -> None:
29        """Clears the value of the Input control."""
30        self.input.clear()

Clears the value of the Input control.

def clear_validate(self) -> None:
32    def clear_validate(self) -> None:
33        """Clears validation of the Input control."""
34        self.input.clearValidate()

Clears validation of the Input control.

def destructor(self) -> None:
36    def destructor(self) -> None:
37        """Removes the Input instance and releases the occupied resources."""
38        self.input.destructor()

Removes the Input instance and releases the occupied resources.

def disable(self) -> None:
40    def disable(self) -> None:
41        """Disables the Input control."""
42        self.input.disable()

Disables the Input control.

def enable(self) -> None:
44    def enable(self) -> None:
45        """Enables the Input control."""
46        self.input.enable()

Enables the Input control.

def focus(self) -> None:
48    def focus(self) -> None:
49        """Sets focus to the Input control."""
50        self.input.focus()

Sets focus to the Input control.

def get_properties(self) -> Dict[str, Any]:
52    def get_properties(self) -> Dict[str, Any]:
53        """Returns the configuration attributes of the control."""
54        return self.input.getProperties().to_py()

Returns the configuration attributes of the control.

def get_value(self) -> Union[str, int]:
56    def get_value(self) -> Union[str, int]:
57        """Returns the current value of the Input control."""
58        return self.input.getValue()

Returns the current value of the Input control.

def hide(self) -> None:
60    def hide(self) -> None:
61        """Hides the Input control."""
62        self.input.hide()

Hides the Input control.

def is_disabled(self) -> bool:
64    def is_disabled(self) -> bool:
65        """Checks whether the Input control is disabled."""
66        return self.input.isDisabled()

Checks whether the Input control is disabled.

def is_visible(self) -> bool:
68    def is_visible(self) -> bool:
69        """Checks whether the Input control is visible on the page."""
70        return self.input.isVisible()

Checks whether the Input control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
72    def set_properties(self, properties: Dict[str, Any]) -> None:
73        """Allows changing configuration attributes of the control dynamically."""
74        self.input.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def set_value(self, value: Union[str, int]) -> None:
76    def set_value(self, value: Union[str, int]) -> None:
77        """Sets the value for the Input control."""
78        self.input.setValue(value)

Sets the value for the Input control.

def show(self) -> None:
80    def show(self) -> None:
81        """Shows the Input control on the page."""
82        self.input.show()

Shows the Input control on the page.

def validate( self, silent: bool = False, validate_value: Union[str, int] = None) -> bool:
84    def validate(self, silent: bool = False, validate_value: Union[str, int] = None) -> bool:
85        """Validates the Input control."""
86        return self.input.validate(silent, validate_value)

Validates the Input control.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
90    def add_event_handler(self, event_name: str, handler: Callable) -> None:
91        """Helper to add event handlers dynamically."""
92        event_proxy = create_proxy(handler)
93        self.input.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
95    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
96        """Fires after configuration attributes have been changed dynamically."""
97        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[Union[str, int], bool], NoneType]) -> None:
 99    def on_after_hide(self, handler: Callable[[Union[str, int], bool], None]) -> None:
100        """Fires after the control is hidden."""
101        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show(self, handler: Callable[[Union[str, int]], NoneType]) -> None:
103    def on_after_show(self, handler: Callable[[Union[str, int]], None]) -> None:
104        """Fires after the control is shown."""
105        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_after_validate(self, handler: Callable[[Union[str, int], bool], NoneType]) -> None:
107    def on_after_validate(self, handler: Callable[[Union[str, int], bool], None]) -> None:
108        """Fires after the control value is validated."""
109        self.add_event_handler('afterValidate', handler)

Fires after the control value is validated.

def on_before_change(self, handler: Callable[[Union[str, int]], Optional[bool]]) -> None:
111    def on_before_change(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
112        """Fires before changing the value of the control."""
113        def event_handler(value):
114            result = handler(value)
115            if result is False:
116                return js.Boolean(False)
117        self.input.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
119    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
120        """Fires before configuration attributes are changed dynamically."""
121        def event_handler(properties):
122            result = handler(properties.to_py())
123            if result is False:
124                return js.Boolean(False)
125        self.input.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide(self, handler: Callable[[Union[str, int], bool], Optional[bool]]) -> None:
127    def on_before_hide(self, handler: Callable[[Union[str, int], bool], Union[bool, None]]) -> None:
128        """Fires before the control is hidden."""
129        def event_handler(value, init):
130            result = handler(value, init)
131            if result is False:
132                return js.Boolean(False)
133        self.input.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show(self, handler: Callable[[Union[str, int]], Optional[bool]]) -> None:
135    def on_before_show(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
136        """Fires before the control is shown."""
137        def event_handler(value):
138            result = handler(value)
139            if result is False:
140                return js.Boolean(False)
141        self.input.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

def on_before_validate(self, handler: Callable[[Union[str, int]], Optional[bool]]) -> None:
143    def on_before_validate(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
144        """Fires before the control value is validated."""
145        def event_handler(value):
146            result = handler(value)
147            if result is False:
148                return js.Boolean(False)
149        self.input.events.on('beforeValidate', create_proxy(event_handler))

Fires before the control value is validated.

def on_blur(self, handler: Callable[[Union[str, int]], NoneType]) -> None:
151    def on_blur(self, handler: Callable[[Union[str, int]], None]) -> None:
152        """Fires when the control has lost focus."""
153        self.add_event_handler('blur', handler)

Fires when the control has lost focus.

def on_change(self, handler: Callable[[Union[str, int]], NoneType]) -> None:
155    def on_change(self, handler: Callable[[Union[str, int]], None]) -> None:
156        """Fires on changing the value of the control."""
157        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_focus(self, handler: Callable[[Union[str, int]], NoneType]) -> None:
159    def on_focus(self, handler: Callable[[Union[str, int]], None]) -> None:
160        """Fires when the control has received focus."""
161        self.add_event_handler('focus', handler)

Fires when the control has received focus.

def on_input(self, handler: Callable[[Union[str, int]], NoneType]) -> None:
163    def on_input(self, handler: Callable[[Union[str, int]], None]) -> None:
164        """Fires when a user types some text in the input."""
165        self.add_event_handler('input', handler)

Fires when a user types some text in the input.

def on_keydown(self, handler: Callable[[Any], NoneType]) -> None:
167    def on_keydown(self, handler: Callable[[Any], None]) -> None:
168        """Fires when any key is pressed and the control is in focus."""
169        self.add_event_handler('keydown', handler)

Fires when any key is pressed and the control is in focus.

class RadioGroup:
 14class RadioGroup:
 15    def __init__(self, config: RadioGroupConfig = None, widget_parent: Any = None):
 16        """Initializes the RadioGroup control."""
 17        if config is None:
 18            config = RadioGroupConfig()
 19        config_dict = config.to_dict()
 20        print(config_dict)
 21        self.radiogroup = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 22
 23    """ RadioGroup API Functions """
 24
 25    def blur(self) -> None:
 26        """Removes focus from the RadioGroup control."""
 27        self.radiogroup.blur()
 28
 29    def clear(self) -> None:
 30        """Clears the value of the RadioGroup control."""
 31        self.radiogroup.clear()
 32
 33    def clear_validate(self) -> None:
 34        """Clears validation of the RadioGroup control."""
 35        self.radiogroup.clearValidate()
 36
 37    def destructor(self) -> None:
 38        """Removes the RadioGroup instance and releases the occupied resources."""
 39        self.radiogroup.destructor()
 40
 41    def disable(self, id: str = None) -> None:
 42        """Disables the RadioGroup control or a specific element inside the control."""
 43        self.radiogroup.disable(id)
 44
 45    def enable(self, id: str = None) -> None:
 46        """Enables the RadioGroup control or a specific element inside the control."""
 47        self.radiogroup.enable(id)
 48
 49    def focus(self, id: str = None) -> None:
 50        """Sets focus to the radio button of the RadioGroup control by its id."""
 51        self.radiogroup.focus(id)
 52
 53    def get_properties(self, id: str = None) -> Dict[str, Any]:
 54        """Returns the configuration attributes of the control or a specific radio button."""
 55        props = self.radiogroup.getProperties(id)
 56        return props.to_py() if props else {}
 57
 58    def get_value(self) -> str:
 59        """Returns the current value of the RadioGroup control."""
 60        return self.radiogroup.getValue()
 61
 62    def hide(self, id: str = None) -> None:
 63        """Hides either a radio button of RadioGroup or the whole RadioGroup."""
 64        self.radiogroup.hide(id)
 65
 66    def is_disabled(self, id: str = None) -> bool:
 67        """Checks whether the RadioGroup control or a specific element is disabled."""
 68        return self.radiogroup.isDisabled(id)
 69
 70    def is_visible(self, id: str = None) -> bool:
 71        """Checks whether the RadioGroup control or a specific element is visible."""
 72        return self.radiogroup.isVisible(id)
 73
 74    def set_properties(self, arg: Union[str, Dict[str, Any]], props: Dict[str, Any] = None) -> None:
 75        """Allows changing configuration attributes of the control dynamically."""
 76        if isinstance(arg, str):
 77            # arg is id, props is properties
 78            self.radiogroup.setProperties(arg, js.JSON.parse(json.dumps(props)))
 79        else:
 80            # arg is properties, props is None
 81            self.radiogroup.setProperties(js.JSON.parse(json.dumps(arg)))
 82
 83    def set_value(self, value: str) -> None:
 84        """Sets the value for the RadioGroup control."""
 85        self.radiogroup.setValue(value)
 86
 87    def show(self, id: str = None) -> None:
 88        """Shows either a radio button of RadioGroup or the whole RadioGroup."""
 89        self.radiogroup.show(id)
 90
 91    def validate(self, silent: bool = False) -> bool:
 92        """Validates the RadioGroup control."""
 93        return self.radiogroup.validate(silent)
 94
 95    """ RadioGroup Events """
 96
 97    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 98        """Helper to add event handlers dynamically."""
 99        event_proxy = create_proxy(handler)
100        self.radiogroup.events.on(event_name, event_proxy)
101
102    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
103        """Fires after configuration attributes have been changed dynamically."""
104        self.add_event_handler('afterChangeProperties', handler)
105
106    def on_after_hide(self, handler: Callable[[str, str, bool], None]) -> None:
107        """Fires after the control or its radio button is hidden."""
108        self.add_event_handler('afterHide', handler)
109
110    def on_after_show(self, handler: Callable[[str, str], None]) -> None:
111        """Fires after the control or its radio button is shown."""
112        self.add_event_handler('afterShow', handler)
113
114    def on_after_validate(self, handler: Callable[[str, bool], None]) -> None:
115        """Fires after the control value is validated."""
116        self.add_event_handler('afterValidate', handler)
117
118    def on_before_change(self, handler: Callable[[str], Union[bool, None]]) -> None:
119        """Fires before changing the value of the control."""
120        def event_handler(value):
121            result = handler(value)
122            if result is False:
123                return js.Boolean(False)
124        self.radiogroup.events.on('beforeChange', create_proxy(event_handler))
125
126    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
127        """Fires before configuration attributes are changed dynamically."""
128        def event_handler(properties):
129            result = handler(properties.to_py())
130            if result is False:
131                return js.Boolean(False)
132        self.radiogroup.events.on('beforeChangeProperties', create_proxy(event_handler))
133
134    def on_before_hide(self, handler: Callable[[str, str, bool], Union[bool, None]]) -> None:
135        """Fires before the control or its radio button is hidden."""
136        def event_handler(value, id, init):
137            result = handler(value, id, init)
138            if result is False:
139                return js.Boolean(False)
140        self.radiogroup.events.on('beforeHide', create_proxy(event_handler))
141
142    def on_before_show(self, handler: Callable[[str, str], Union[bool, None]]) -> None:
143        """Fires before the control or its radio button is shown."""
144        def event_handler(value, id):
145            result = handler(value, id)
146            if result is False:
147                return js.Boolean(False)
148        self.radiogroup.events.on('beforeShow', create_proxy(event_handler))
149
150    def on_before_validate(self, handler: Callable[[str], Union[bool, None]]) -> None:
151        """Fires before the control value is validated."""
152        def event_handler(value):
153            result = handler(value)
154            if result is False:
155                return js.Boolean(False)
156        self.radiogroup.events.on('beforeValidate', create_proxy(event_handler))
157
158    def on_blur(self, handler: Callable[[str, str], None]) -> None:
159        """Fires when the RadioGroup control has lost focus."""
160        self.add_event_handler('blur', handler)
161
162    def on_change(self, handler: Callable[[str], None]) -> None:
163        """Fires on changing the value of the control."""
164        self.add_event_handler('change', handler)
165
166    def on_focus(self, handler: Callable[[str, str], None]) -> None:
167        """Fires when the RadioGroup control has received focus."""
168        self.add_event_handler('focus', handler)
169
170    def on_keydown(self, handler: Callable[[Any, str], None]) -> None:
171        """Fires when any key is pressed and a radio button is in focus."""
172        self.add_event_handler('keydown', handler)
RadioGroup( config: RadioGroupConfig = None, widget_parent: Any = None)
15    def __init__(self, config: RadioGroupConfig = None, widget_parent: Any = None):
16        """Initializes the RadioGroup control."""
17        if config is None:
18            config = RadioGroupConfig()
19        config_dict = config.to_dict()
20        print(config_dict)
21        self.radiogroup = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the RadioGroup control.

radiogroup

RadioGroup API Functions

def blur(self) -> None:
25    def blur(self) -> None:
26        """Removes focus from the RadioGroup control."""
27        self.radiogroup.blur()

Removes focus from the RadioGroup control.

def clear(self) -> None:
29    def clear(self) -> None:
30        """Clears the value of the RadioGroup control."""
31        self.radiogroup.clear()

Clears the value of the RadioGroup control.

def clear_validate(self) -> None:
33    def clear_validate(self) -> None:
34        """Clears validation of the RadioGroup control."""
35        self.radiogroup.clearValidate()

Clears validation of the RadioGroup control.

def destructor(self) -> None:
37    def destructor(self) -> None:
38        """Removes the RadioGroup instance and releases the occupied resources."""
39        self.radiogroup.destructor()

Removes the RadioGroup instance and releases the occupied resources.

def disable(self, id: str = None) -> None:
41    def disable(self, id: str = None) -> None:
42        """Disables the RadioGroup control or a specific element inside the control."""
43        self.radiogroup.disable(id)

Disables the RadioGroup control or a specific element inside the control.

def enable(self, id: str = None) -> None:
45    def enable(self, id: str = None) -> None:
46        """Enables the RadioGroup control or a specific element inside the control."""
47        self.radiogroup.enable(id)

Enables the RadioGroup control or a specific element inside the control.

def focus(self, id: str = None) -> None:
49    def focus(self, id: str = None) -> None:
50        """Sets focus to the radio button of the RadioGroup control by its id."""
51        self.radiogroup.focus(id)

Sets focus to the radio button of the RadioGroup control by its id.

def get_properties(self, id: str = None) -> Dict[str, Any]:
53    def get_properties(self, id: str = None) -> Dict[str, Any]:
54        """Returns the configuration attributes of the control or a specific radio button."""
55        props = self.radiogroup.getProperties(id)
56        return props.to_py() if props else {}

Returns the configuration attributes of the control or a specific radio button.

def get_value(self) -> str:
58    def get_value(self) -> str:
59        """Returns the current value of the RadioGroup control."""
60        return self.radiogroup.getValue()

Returns the current value of the RadioGroup control.

def hide(self, id: str = None) -> None:
62    def hide(self, id: str = None) -> None:
63        """Hides either a radio button of RadioGroup or the whole RadioGroup."""
64        self.radiogroup.hide(id)

Hides either a radio button of RadioGroup or the whole RadioGroup.

def is_disabled(self, id: str = None) -> bool:
66    def is_disabled(self, id: str = None) -> bool:
67        """Checks whether the RadioGroup control or a specific element is disabled."""
68        return self.radiogroup.isDisabled(id)

Checks whether the RadioGroup control or a specific element is disabled.

def is_visible(self, id: str = None) -> bool:
70    def is_visible(self, id: str = None) -> bool:
71        """Checks whether the RadioGroup control or a specific element is visible."""
72        return self.radiogroup.isVisible(id)

Checks whether the RadioGroup control or a specific element is visible.

def set_properties( self, arg: Union[str, Dict[str, Any]], props: Dict[str, Any] = None) -> None:
74    def set_properties(self, arg: Union[str, Dict[str, Any]], props: Dict[str, Any] = None) -> None:
75        """Allows changing configuration attributes of the control dynamically."""
76        if isinstance(arg, str):
77            # arg is id, props is properties
78            self.radiogroup.setProperties(arg, js.JSON.parse(json.dumps(props)))
79        else:
80            # arg is properties, props is None
81            self.radiogroup.setProperties(js.JSON.parse(json.dumps(arg)))

Allows changing configuration attributes of the control dynamically.

def set_value(self, value: str) -> None:
83    def set_value(self, value: str) -> None:
84        """Sets the value for the RadioGroup control."""
85        self.radiogroup.setValue(value)

Sets the value for the RadioGroup control.

def show(self, id: str = None) -> None:
87    def show(self, id: str = None) -> None:
88        """Shows either a radio button of RadioGroup or the whole RadioGroup."""
89        self.radiogroup.show(id)

Shows either a radio button of RadioGroup or the whole RadioGroup.

def validate(self, silent: bool = False) -> bool:
91    def validate(self, silent: bool = False) -> bool:
92        """Validates the RadioGroup control."""
93        return self.radiogroup.validate(silent)

Validates the RadioGroup control.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
 97    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 98        """Helper to add event handlers dynamically."""
 99        event_proxy = create_proxy(handler)
100        self.radiogroup.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
102    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
103        """Fires after configuration attributes have been changed dynamically."""
104        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[str, str, bool], NoneType]) -> None:
106    def on_after_hide(self, handler: Callable[[str, str, bool], None]) -> None:
107        """Fires after the control or its radio button is hidden."""
108        self.add_event_handler('afterHide', handler)

Fires after the control or its radio button is hidden.

def on_after_show(self, handler: Callable[[str, str], NoneType]) -> None:
110    def on_after_show(self, handler: Callable[[str, str], None]) -> None:
111        """Fires after the control or its radio button is shown."""
112        self.add_event_handler('afterShow', handler)

Fires after the control or its radio button is shown.

def on_after_validate(self, handler: Callable[[str, bool], NoneType]) -> None:
114    def on_after_validate(self, handler: Callable[[str, bool], None]) -> None:
115        """Fires after the control value is validated."""
116        self.add_event_handler('afterValidate', handler)

Fires after the control value is validated.

def on_before_change(self, handler: Callable[[str], Optional[bool]]) -> None:
118    def on_before_change(self, handler: Callable[[str], Union[bool, None]]) -> None:
119        """Fires before changing the value of the control."""
120        def event_handler(value):
121            result = handler(value)
122            if result is False:
123                return js.Boolean(False)
124        self.radiogroup.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
126    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
127        """Fires before configuration attributes are changed dynamically."""
128        def event_handler(properties):
129            result = handler(properties.to_py())
130            if result is False:
131                return js.Boolean(False)
132        self.radiogroup.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide(self, handler: Callable[[str, str, bool], Optional[bool]]) -> None:
134    def on_before_hide(self, handler: Callable[[str, str, bool], Union[bool, None]]) -> None:
135        """Fires before the control or its radio button is hidden."""
136        def event_handler(value, id, init):
137            result = handler(value, id, init)
138            if result is False:
139                return js.Boolean(False)
140        self.radiogroup.events.on('beforeHide', create_proxy(event_handler))

Fires before the control or its radio button is hidden.

def on_before_show(self, handler: Callable[[str, str], Optional[bool]]) -> None:
142    def on_before_show(self, handler: Callable[[str, str], Union[bool, None]]) -> None:
143        """Fires before the control or its radio button is shown."""
144        def event_handler(value, id):
145            result = handler(value, id)
146            if result is False:
147                return js.Boolean(False)
148        self.radiogroup.events.on('beforeShow', create_proxy(event_handler))

Fires before the control or its radio button is shown.

def on_before_validate(self, handler: Callable[[str], Optional[bool]]) -> None:
150    def on_before_validate(self, handler: Callable[[str], Union[bool, None]]) -> None:
151        """Fires before the control value is validated."""
152        def event_handler(value):
153            result = handler(value)
154            if result is False:
155                return js.Boolean(False)
156        self.radiogroup.events.on('beforeValidate', create_proxy(event_handler))

Fires before the control value is validated.

def on_blur(self, handler: Callable[[str, str], NoneType]) -> None:
158    def on_blur(self, handler: Callable[[str, str], None]) -> None:
159        """Fires when the RadioGroup control has lost focus."""
160        self.add_event_handler('blur', handler)

Fires when the RadioGroup control has lost focus.

def on_change(self, handler: Callable[[str], NoneType]) -> None:
162    def on_change(self, handler: Callable[[str], None]) -> None:
163        """Fires on changing the value of the control."""
164        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_focus(self, handler: Callable[[str, str], NoneType]) -> None:
166    def on_focus(self, handler: Callable[[str, str], None]) -> None:
167        """Fires when the RadioGroup control has received focus."""
168        self.add_event_handler('focus', handler)

Fires when the RadioGroup control has received focus.

def on_keydown(self, handler: Callable[[Any, str], NoneType]) -> None:
170    def on_keydown(self, handler: Callable[[Any, str], None]) -> None:
171        """Fires when any key is pressed and a radio button is in focus."""
172        self.add_event_handler('keydown', handler)

Fires when any key is pressed and a radio button is in focus.

class Select:
 14class Select:
 15    def __init__(self, config: SelectConfig = None, widget_parent: Any = None):
 16        """Initializes the Select control."""
 17        if config is None:
 18            config = SelectConfig()
 19        config_dict = config.to_dict()
 20        self.select = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ Select API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from the Select control."""
 26        self.select.blur()
 27
 28    def clear(self) -> None:
 29        """Clears the value of the Select control."""
 30        self.select.clear()
 31
 32    def clear_validate(self) -> None:
 33        """Clears validation of the Select control."""
 34        self.select.clearValidate()
 35
 36    def destructor(self) -> None:
 37        """Removes the Select instance and releases the occupied resources."""
 38        self.select.destructor()
 39
 40    def disable(self, value: Union[str, int] = None) -> None:
 41        """Disables the Select control or a specific option."""
 42        self.select.disable(value)
 43
 44    def enable(self, value: Union[str, int] = None) -> None:
 45        """Enables the Select control or a specific option."""
 46        self.select.enable(value)
 47
 48    def focus(self) -> None:
 49        """Sets focus to the Select control."""
 50        self.select.focus()
 51
 52    def get_properties(self) -> Dict[str, Any]:
 53        """Returns the configuration attributes of the control."""
 54        return self.select.getProperties().to_py()
 55
 56    def get_options(self) -> List[Dict[str, Any]]:
 57        """Returns an array of Select options."""
 58        options = self.select.getOptions()
 59        return [option.to_py() for option in options]
 60
 61    def get_value(self) -> Union[str, int]:
 62        """Returns the current value of the Select control."""
 63        return self.select.getValue()
 64
 65    def hide(self) -> None:
 66        """Hides the Select control."""
 67        self.select.hide()
 68
 69    def is_disabled(self, value: Union[str, int] = None) -> bool:
 70        """Checks whether the Select control or a specific option is disabled."""
 71        return self.select.isDisabled(value)
 72
 73    def is_visible(self) -> bool:
 74        """Checks whether the Select control is visible on the page."""
 75        return self.select.isVisible()
 76
 77    def set_options(self, options: List[Dict[str, Any]]) -> None:
 78        """Allows changing a list of Select options dynamically."""
 79        self.select.setOptions(js.JSON.parse(json.dumps(options)))
 80
 81    def set_properties(self, properties: Dict[str, Any]) -> None:
 82        """Allows changing configuration attributes of the control dynamically."""
 83        self.select.setProperties(js.JSON.parse(json.dumps(properties)))
 84
 85    def set_value(self, value: Union[str, int]) -> None:
 86        """Sets the value for the Select control."""
 87        self.select.setValue(value)
 88
 89    def show(self) -> None:
 90        """Shows the Select control on the page."""
 91        self.select.show()
 92
 93    def validate(self, silent: bool = False) -> bool:
 94        """Validates the Select control."""
 95        return self.select.validate(silent)
 96
 97    """ Select Events """
 98
 99    def add_event_handler(self, event_name: str, handler: Callable) -> None:
100        """Helper to add event handlers dynamically."""
101        event_proxy = create_proxy(handler)
102        self.select.events.on(event_name, event_proxy)
103
104    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
105        """Fires after configuration attributes have been changed dynamically."""
106        self.add_event_handler('afterChangeProperties', handler)
107
108    def on_after_hide(self, handler: Callable[[Union[str, int], bool], None]) -> None:
109        """Fires after the control is hidden."""
110        self.add_event_handler('afterHide', handler)
111
112    def on_after_show(self, handler: Callable[[Union[str, int]], None]) -> None:
113        """Fires after the control is shown."""
114        self.add_event_handler('afterShow', handler)
115
116    def on_after_validate(self, handler: Callable[[Union[str, int], bool], None]) -> None:
117        """Fires after the control value is validated."""
118        self.add_event_handler('afterValidate', handler)
119
120    def on_before_change(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
121        """Fires before changing the value of the control."""
122        def event_handler(value):
123            result = handler(value)
124            if result is False:
125                return js.Boolean(False)
126        self.select.events.on('beforeChange', create_proxy(event_handler))
127
128    def on_before_change_options(self, handler: Callable[[List[Dict[str, Any]]], Union[bool, None]]) -> None:
129        """Fires before changing a list of Select options."""
130        def event_handler(options):
131            options_py = [option.to_py() for option in options]
132            result = handler(options_py)
133            if result is False:
134                return js.Boolean(False)
135        self.select.events.on('beforeChangeOptions', create_proxy(event_handler))
136
137    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
138        """Fires before configuration attributes are changed dynamically."""
139        def event_handler(properties):
140            result = handler(properties.to_py())
141            if result is False:
142                return js.Boolean(False)
143        self.select.events.on('beforeChangeProperties', create_proxy(event_handler))
144
145    def on_before_hide(self, handler: Callable[[Union[str, int], bool], Union[bool, None]]) -> None:
146        """Fires before the control is hidden."""
147        def event_handler(value, init):
148            result = handler(value, init)
149            if result is False:
150                return js.Boolean(False)
151        self.select.events.on('beforeHide', create_proxy(event_handler))
152
153    def on_before_show(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
154        """Fires before the control is shown."""
155        def event_handler(value):
156            result = handler(value)
157            if result is False:
158                return js.Boolean(False)
159        self.select.events.on('beforeShow', create_proxy(event_handler))
160
161    def on_before_validate(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
162        """Fires before the control value is validated."""
163        def event_handler(value):
164            result = handler(value)
165            if result is False:
166                return js.Boolean(False)
167        self.select.events.on('beforeValidate', create_proxy(event_handler))
168
169    def on_blur(self, handler: Callable[[Union[str, int]], None]) -> None:
170        """Fires when the control has lost focus."""
171        self.add_event_handler('blur', handler)
172
173    def on_change(self, handler: Callable[[Union[str, int]], None]) -> None:
174        """Fires on changing the value of the control."""
175        self.add_event_handler('change', handler)
176
177    def on_change_options(self, handler: Callable[[List[Dict[str, Any]]], None]) -> None:
178        """Fires on changing a list of Select options."""
179        self.add_event_handler('changeOptions', handler)
180
181    def on_focus(self, handler: Callable[[Union[str, int]], None]) -> None:
182        """Fires when the control has received focus."""
183        self.add_event_handler('focus', handler)
184
185    def on_keydown(self, handler: Callable[[Any], None]) -> None:
186        """Fires when any key is pressed and the control is in focus."""
187        self.add_event_handler('keydown', handler)
Select( config: SelectConfig = None, widget_parent: Any = None)
15    def __init__(self, config: SelectConfig = None, widget_parent: Any = None):
16        """Initializes the Select control."""
17        if config is None:
18            config = SelectConfig()
19        config_dict = config.to_dict()
20        self.select = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Select control.

select

Select API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from the Select control."""
26        self.select.blur()

Removes focus from the Select control.

def clear(self) -> None:
28    def clear(self) -> None:
29        """Clears the value of the Select control."""
30        self.select.clear()

Clears the value of the Select control.

def clear_validate(self) -> None:
32    def clear_validate(self) -> None:
33        """Clears validation of the Select control."""
34        self.select.clearValidate()

Clears validation of the Select control.

def destructor(self) -> None:
36    def destructor(self) -> None:
37        """Removes the Select instance and releases the occupied resources."""
38        self.select.destructor()

Removes the Select instance and releases the occupied resources.

def disable(self, value: Union[str, int] = None) -> None:
40    def disable(self, value: Union[str, int] = None) -> None:
41        """Disables the Select control or a specific option."""
42        self.select.disable(value)

Disables the Select control or a specific option.

def enable(self, value: Union[str, int] = None) -> None:
44    def enable(self, value: Union[str, int] = None) -> None:
45        """Enables the Select control or a specific option."""
46        self.select.enable(value)

Enables the Select control or a specific option.

def focus(self) -> None:
48    def focus(self) -> None:
49        """Sets focus to the Select control."""
50        self.select.focus()

Sets focus to the Select control.

def get_properties(self) -> Dict[str, Any]:
52    def get_properties(self) -> Dict[str, Any]:
53        """Returns the configuration attributes of the control."""
54        return self.select.getProperties().to_py()

Returns the configuration attributes of the control.

def get_options(self) -> List[Dict[str, Any]]:
56    def get_options(self) -> List[Dict[str, Any]]:
57        """Returns an array of Select options."""
58        options = self.select.getOptions()
59        return [option.to_py() for option in options]

Returns an array of Select options.

def get_value(self) -> Union[str, int]:
61    def get_value(self) -> Union[str, int]:
62        """Returns the current value of the Select control."""
63        return self.select.getValue()

Returns the current value of the Select control.

def hide(self) -> None:
65    def hide(self) -> None:
66        """Hides the Select control."""
67        self.select.hide()

Hides the Select control.

def is_disabled(self, value: Union[str, int] = None) -> bool:
69    def is_disabled(self, value: Union[str, int] = None) -> bool:
70        """Checks whether the Select control or a specific option is disabled."""
71        return self.select.isDisabled(value)

Checks whether the Select control or a specific option is disabled.

def is_visible(self) -> bool:
73    def is_visible(self) -> bool:
74        """Checks whether the Select control is visible on the page."""
75        return self.select.isVisible()

Checks whether the Select control is visible on the page.

def set_options(self, options: List[Dict[str, Any]]) -> None:
77    def set_options(self, options: List[Dict[str, Any]]) -> None:
78        """Allows changing a list of Select options dynamically."""
79        self.select.setOptions(js.JSON.parse(json.dumps(options)))

Allows changing a list of Select options dynamically.

def set_properties(self, properties: Dict[str, Any]) -> None:
81    def set_properties(self, properties: Dict[str, Any]) -> None:
82        """Allows changing configuration attributes of the control dynamically."""
83        self.select.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def set_value(self, value: Union[str, int]) -> None:
85    def set_value(self, value: Union[str, int]) -> None:
86        """Sets the value for the Select control."""
87        self.select.setValue(value)

Sets the value for the Select control.

def show(self) -> None:
89    def show(self) -> None:
90        """Shows the Select control on the page."""
91        self.select.show()

Shows the Select control on the page.

def validate(self, silent: bool = False) -> bool:
93    def validate(self, silent: bool = False) -> bool:
94        """Validates the Select control."""
95        return self.select.validate(silent)

Validates the Select control.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
 99    def add_event_handler(self, event_name: str, handler: Callable) -> None:
100        """Helper to add event handlers dynamically."""
101        event_proxy = create_proxy(handler)
102        self.select.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
104    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
105        """Fires after configuration attributes have been changed dynamically."""
106        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[Union[str, int], bool], NoneType]) -> None:
108    def on_after_hide(self, handler: Callable[[Union[str, int], bool], None]) -> None:
109        """Fires after the control is hidden."""
110        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show(self, handler: Callable[[Union[str, int]], NoneType]) -> None:
112    def on_after_show(self, handler: Callable[[Union[str, int]], None]) -> None:
113        """Fires after the control is shown."""
114        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_after_validate(self, handler: Callable[[Union[str, int], bool], NoneType]) -> None:
116    def on_after_validate(self, handler: Callable[[Union[str, int], bool], None]) -> None:
117        """Fires after the control value is validated."""
118        self.add_event_handler('afterValidate', handler)

Fires after the control value is validated.

def on_before_change(self, handler: Callable[[Union[str, int]], Optional[bool]]) -> None:
120    def on_before_change(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
121        """Fires before changing the value of the control."""
122        def event_handler(value):
123            result = handler(value)
124            if result is False:
125                return js.Boolean(False)
126        self.select.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_options(self, handler: Callable[[List[Dict[str, Any]]], Optional[bool]]) -> None:
128    def on_before_change_options(self, handler: Callable[[List[Dict[str, Any]]], Union[bool, None]]) -> None:
129        """Fires before changing a list of Select options."""
130        def event_handler(options):
131            options_py = [option.to_py() for option in options]
132            result = handler(options_py)
133            if result is False:
134                return js.Boolean(False)
135        self.select.events.on('beforeChangeOptions', create_proxy(event_handler))

Fires before changing a list of Select options.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
137    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
138        """Fires before configuration attributes are changed dynamically."""
139        def event_handler(properties):
140            result = handler(properties.to_py())
141            if result is False:
142                return js.Boolean(False)
143        self.select.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide(self, handler: Callable[[Union[str, int], bool], Optional[bool]]) -> None:
145    def on_before_hide(self, handler: Callable[[Union[str, int], bool], Union[bool, None]]) -> None:
146        """Fires before the control is hidden."""
147        def event_handler(value, init):
148            result = handler(value, init)
149            if result is False:
150                return js.Boolean(False)
151        self.select.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show(self, handler: Callable[[Union[str, int]], Optional[bool]]) -> None:
153    def on_before_show(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
154        """Fires before the control is shown."""
155        def event_handler(value):
156            result = handler(value)
157            if result is False:
158                return js.Boolean(False)
159        self.select.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

def on_before_validate(self, handler: Callable[[Union[str, int]], Optional[bool]]) -> None:
161    def on_before_validate(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
162        """Fires before the control value is validated."""
163        def event_handler(value):
164            result = handler(value)
165            if result is False:
166                return js.Boolean(False)
167        self.select.events.on('beforeValidate', create_proxy(event_handler))

Fires before the control value is validated.

def on_blur(self, handler: Callable[[Union[str, int]], NoneType]) -> None:
169    def on_blur(self, handler: Callable[[Union[str, int]], None]) -> None:
170        """Fires when the control has lost focus."""
171        self.add_event_handler('blur', handler)

Fires when the control has lost focus.

def on_change(self, handler: Callable[[Union[str, int]], NoneType]) -> None:
173    def on_change(self, handler: Callable[[Union[str, int]], None]) -> None:
174        """Fires on changing the value of the control."""
175        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_change_options(self, handler: Callable[[List[Dict[str, Any]]], NoneType]) -> None:
177    def on_change_options(self, handler: Callable[[List[Dict[str, Any]]], None]) -> None:
178        """Fires on changing a list of Select options."""
179        self.add_event_handler('changeOptions', handler)

Fires on changing a list of Select options.

def on_focus(self, handler: Callable[[Union[str, int]], NoneType]) -> None:
181    def on_focus(self, handler: Callable[[Union[str, int]], None]) -> None:
182        """Fires when the control has received focus."""
183        self.add_event_handler('focus', handler)

Fires when the control has received focus.

def on_keydown(self, handler: Callable[[Any], NoneType]) -> None:
185    def on_keydown(self, handler: Callable[[Any], None]) -> None:
186        """Fires when any key is pressed and the control is in focus."""
187        self.add_event_handler('keydown', handler)

Fires when any key is pressed and the control is in focus.

class SimpleVault:
 14class SimpleVault:
 15    def __init__(self, config: SimpleVaultConfig = None, widget_parent: Any = None):
 16        """Initializes the SimpleVault control."""
 17        if config is None:
 18            config = SimpleVaultConfig()
 19        config_dict = config.to_dict()
 20        self.simplevault = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ SimpleVault API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from the SimpleVault control."""
 26        self.simplevault.blur()
 27
 28    def clear(self) -> None:
 29        """Clears the value of the SimpleVault control."""
 30        self.simplevault.clear()
 31
 32    def clear_validate(self) -> None:
 33        """Clears validation of the SimpleVault control."""
 34        self.simplevault.clearValidate()
 35
 36    def destructor(self) -> None:
 37        """Removes the SimpleVault instance and releases the occupied resources."""
 38        self.simplevault.destructor()
 39
 40    def disable(self) -> None:
 41        """Disables the SimpleVault control."""
 42        self.simplevault.disable()
 43
 44    def enable(self) -> None:
 45        """Enables the SimpleVault control."""
 46        self.simplevault.enable()
 47
 48    def focus(self) -> None:
 49        """Sets focus to the SimpleVault control."""
 50        self.simplevault.focus()
 51
 52    def get_properties(self) -> Dict[str, Any]:
 53        """Returns the configuration attributes of the control."""
 54        return self.simplevault.getProperties().to_py()
 55
 56    def get_value(self) -> List[Dict[str, Any]]:
 57        """Returns the current value of the SimpleVault control."""
 58        value = self.simplevault.getValue()
 59        return [item.to_py() for item in value]
 60
 61    def hide(self) -> None:
 62        """Hides the SimpleVault control."""
 63        self.simplevault.hide()
 64
 65    def is_disabled(self) -> bool:
 66        """Checks whether the SimpleVault control is disabled."""
 67        return self.simplevault.isDisabled()
 68
 69    def is_visible(self) -> bool:
 70        """Checks whether the SimpleVault control is visible on the page."""
 71        return self.simplevault.isVisible()
 72
 73    def select_file(self) -> None:
 74        """Opens the dialog for selecting new files for adding to the SimpleVault."""
 75        self.simplevault.selectFile()
 76
 77    def send(self, params: Dict[str, Any] = None) -> None:
 78        """Sends a POST request for file upload to a server-side URL."""
 79        self.simplevault.send(params)
 80
 81    def set_properties(self, properties: Dict[str, Any]) -> None:
 82        """Allows changing configuration attributes of the control dynamically."""
 83        self.simplevault.setProperties(js.JSON.parse(json.dumps(properties)))
 84
 85    def set_value(self, value: List[Dict[str, Any]]) -> None:
 86        """Sets the value for the SimpleVault control."""
 87        self.simplevault.setValue(js.JSON.parse(json.dumps(value)))
 88
 89    def show(self) -> None:
 90        """Shows the SimpleVault control on the page."""
 91        self.simplevault.show()
 92
 93    def validate(self, silent: bool = False, validate_value: List[Dict[str, Any]] = None) -> bool:
 94        """Validates the SimpleVault control."""
 95        return self.simplevault.validate(silent, validate_value)
 96
 97    """ SimpleVault Events """
 98
 99    def add_event_handler(self, event_name: str, handler: Callable) -> None:
100        """Helper to add event handlers dynamically."""
101        event_proxy = create_proxy(handler)
102        self.simplevault.events.on(event_name, event_proxy)
103
104    def on_after_add(self, handler: Callable[[Dict[str, Any]], None]) -> None:
105        """Fires after a file is added to the data collection."""
106        self.add_event_handler('afterAdd', handler)
107
108    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
109        """Fires after configuration attributes have been changed dynamically."""
110        self.add_event_handler('afterChangeProperties', handler)
111
112    def on_after_hide(self, handler: Callable[[List[Dict[str, Any]], bool], None]) -> None:
113        """Fires after the control is hidden."""
114        self.add_event_handler('afterHide', handler)
115
116    def on_after_remove(self, handler: Callable[[Dict[str, Any]], None]) -> None:
117        """Fires after a file is removed from the data collection."""
118        self.add_event_handler('afterRemove', handler)
119
120    def on_after_show(self, handler: Callable[[List[Dict[str, Any]]], None]) -> None:
121        """Fires after the control is shown."""
122        self.add_event_handler('afterShow', handler)
123
124    def on_after_validate(self, handler: Callable[[List[Dict[str, Any]], bool], None]) -> None:
125        """Fires after the control value is validated."""
126        self.add_event_handler('afterValidate', handler)
127
128    def on_before_add(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
129        """Fires before a file is added to the data collection."""
130        def event_handler(file):
131            result = handler(file.to_py())
132            if result is False:
133                return js.Boolean(False)
134        self.simplevault.events.on('beforeAdd', create_proxy(event_handler))
135
136    def on_before_change(self, handler: Callable[[List[Dict[str, Any]], Dict[str, Any]], Union[bool, None]]) -> None:
137        """Fires before changing the value of the control."""
138        def event_handler(value, file=None):
139            value_py = [item.to_py() for item in value]
140            file_py = file.to_py() if file else None
141            result = handler(value_py, file_py)
142            if result is False:
143                return js.Boolean(False)
144        self.simplevault.events.on('beforeChange', create_proxy(event_handler))
145
146    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
147        """Fires before configuration attributes are changed dynamically."""
148        def event_handler(properties):
149            result = handler(properties.to_py())
150            if result is False:
151                return js.Boolean(False)
152        self.simplevault.events.on('beforeChangeProperties', create_proxy(event_handler))
153
154    def on_before_hide(self, handler: Callable[[List[Dict[str, Any]], bool], Union[bool, None]]) -> None:
155        """Fires before the control is hidden."""
156        def event_handler(value, init):
157            value_py = [item.to_py() for item in value]
158            result = handler(value_py, init)
159            if result is False:
160                return js.Boolean(False)
161        self.simplevault.events.on('beforeHide', create_proxy(event_handler))
162
163    def on_before_remove(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
164        """Fires before a file is removed from the data collection."""
165        def event_handler(file):
166            result = handler(file.to_py())
167            if result is False:
168                return js.Boolean(False)
169        self.simplevault.events.on('beforeRemove', create_proxy(event_handler))
170
171    def on_before_show(self, handler: Callable[[List[Dict[str, Any]]], Union[bool, None]]) -> None:
172        """Fires before the control is shown."""
173        def event_handler(value):
174            value_py = [item.to_py() for item in value]
175            result = handler(value_py)
176            if result is False:
177                return js.Boolean(False)
178        self.simplevault.events.on('beforeShow', create_proxy(event_handler))
179
180    def on_before_upload_file(self, handler: Callable[[Dict[str, Any], List[Dict[str, Any]]], Union[bool, None]]) -> None:
181        """Fires before file upload begins."""
182        def event_handler(file, value):
183            file_py = file.to_py()
184            value_py = [item.to_py() for item in value]
185            result = handler(file_py, value_py)
186            if result is False:
187                return js.Boolean(False)
188        self.simplevault.events.on('beforeUploadFile', create_proxy(event_handler))
189
190    def on_before_validate(self, handler: Callable[[List[Dict[str, Any]]], Union[bool, None]]) -> None:
191        """Fires before the control value is validated."""
192        def event_handler(value):
193            value_py = [item.to_py() for item in value]
194            result = handler(value_py)
195            if result is False:
196                return js.Boolean(False)
197        self.simplevault.events.on('beforeValidate', create_proxy(event_handler))
198
199    def on_change(self, handler: Callable[[List[Dict[str, Any]]], None]) -> None:
200        """Fires on changing the value of the control."""
201        self.add_event_handler('change', handler)
202
203    def on_upload_begin(self, handler: Callable[[List[Dict[str, Any]], List[Dict[str, Any]]], None]) -> None:
204        """Fires when file upload begins."""
205        self.add_event_handler('uploadBegin', handler)
206
207    def on_upload_complete(self, handler: Callable[[List[Dict[str, Any]], List[Dict[str, Any]]], None]) -> None:
208        """Fires when upload is completed."""
209        self.add_event_handler('uploadComplete', handler)
210
211    def on_upload_fail(self, handler: Callable[[Dict[str, Any], List[Dict[str, Any]]], None]) -> None:
212        """Fires if the file upload failed."""
213        self.add_event_handler('uploadFail', handler)
214
215    def on_upload_file(self, handler: Callable[[Dict[str, Any], List[Dict[str, Any]], Dict[str, Any]], None]) -> None:
216        """Fires when a file has been uploaded."""
217        self.add_event_handler('uploadFile', handler)
218
219    def on_upload_progress(self, handler: Callable[[int, List[Dict[str, Any]]], None]) -> None:
220        """Fires on each percent of files uploading."""
221        self.add_event_handler('uploadProgress', handler)
SimpleVault( config: SimpleVaultConfig = None, widget_parent: Any = None)
15    def __init__(self, config: SimpleVaultConfig = None, widget_parent: Any = None):
16        """Initializes the SimpleVault control."""
17        if config is None:
18            config = SimpleVaultConfig()
19        config_dict = config.to_dict()
20        self.simplevault = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the SimpleVault control.

simplevault

SimpleVault API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from the SimpleVault control."""
26        self.simplevault.blur()

Removes focus from the SimpleVault control.

def clear(self) -> None:
28    def clear(self) -> None:
29        """Clears the value of the SimpleVault control."""
30        self.simplevault.clear()

Clears the value of the SimpleVault control.

def clear_validate(self) -> None:
32    def clear_validate(self) -> None:
33        """Clears validation of the SimpleVault control."""
34        self.simplevault.clearValidate()

Clears validation of the SimpleVault control.

def destructor(self) -> None:
36    def destructor(self) -> None:
37        """Removes the SimpleVault instance and releases the occupied resources."""
38        self.simplevault.destructor()

Removes the SimpleVault instance and releases the occupied resources.

def disable(self) -> None:
40    def disable(self) -> None:
41        """Disables the SimpleVault control."""
42        self.simplevault.disable()

Disables the SimpleVault control.

def enable(self) -> None:
44    def enable(self) -> None:
45        """Enables the SimpleVault control."""
46        self.simplevault.enable()

Enables the SimpleVault control.

def focus(self) -> None:
48    def focus(self) -> None:
49        """Sets focus to the SimpleVault control."""
50        self.simplevault.focus()

Sets focus to the SimpleVault control.

def get_properties(self) -> Dict[str, Any]:
52    def get_properties(self) -> Dict[str, Any]:
53        """Returns the configuration attributes of the control."""
54        return self.simplevault.getProperties().to_py()

Returns the configuration attributes of the control.

def get_value(self) -> List[Dict[str, Any]]:
56    def get_value(self) -> List[Dict[str, Any]]:
57        """Returns the current value of the SimpleVault control."""
58        value = self.simplevault.getValue()
59        return [item.to_py() for item in value]

Returns the current value of the SimpleVault control.

def hide(self) -> None:
61    def hide(self) -> None:
62        """Hides the SimpleVault control."""
63        self.simplevault.hide()

Hides the SimpleVault control.

def is_disabled(self) -> bool:
65    def is_disabled(self) -> bool:
66        """Checks whether the SimpleVault control is disabled."""
67        return self.simplevault.isDisabled()

Checks whether the SimpleVault control is disabled.

def is_visible(self) -> bool:
69    def is_visible(self) -> bool:
70        """Checks whether the SimpleVault control is visible on the page."""
71        return self.simplevault.isVisible()

Checks whether the SimpleVault control is visible on the page.

def select_file(self) -> None:
73    def select_file(self) -> None:
74        """Opens the dialog for selecting new files for adding to the SimpleVault."""
75        self.simplevault.selectFile()

Opens the dialog for selecting new files for adding to the SimpleVault.

def send(self, params: Dict[str, Any] = None) -> None:
77    def send(self, params: Dict[str, Any] = None) -> None:
78        """Sends a POST request for file upload to a server-side URL."""
79        self.simplevault.send(params)

Sends a POST request for file upload to a server-side URL.

def set_properties(self, properties: Dict[str, Any]) -> None:
81    def set_properties(self, properties: Dict[str, Any]) -> None:
82        """Allows changing configuration attributes of the control dynamically."""
83        self.simplevault.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def set_value(self, value: List[Dict[str, Any]]) -> None:
85    def set_value(self, value: List[Dict[str, Any]]) -> None:
86        """Sets the value for the SimpleVault control."""
87        self.simplevault.setValue(js.JSON.parse(json.dumps(value)))

Sets the value for the SimpleVault control.

def show(self) -> None:
89    def show(self) -> None:
90        """Shows the SimpleVault control on the page."""
91        self.simplevault.show()

Shows the SimpleVault control on the page.

def validate( self, silent: bool = False, validate_value: List[Dict[str, Any]] = None) -> bool:
93    def validate(self, silent: bool = False, validate_value: List[Dict[str, Any]] = None) -> bool:
94        """Validates the SimpleVault control."""
95        return self.simplevault.validate(silent, validate_value)

Validates the SimpleVault control.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
 99    def add_event_handler(self, event_name: str, handler: Callable) -> None:
100        """Helper to add event handlers dynamically."""
101        event_proxy = create_proxy(handler)
102        self.simplevault.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_add(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
104    def on_after_add(self, handler: Callable[[Dict[str, Any]], None]) -> None:
105        """Fires after a file is added to the data collection."""
106        self.add_event_handler('afterAdd', handler)

Fires after a file is added to the data collection.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
108    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
109        """Fires after configuration attributes have been changed dynamically."""
110        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[List[Dict[str, Any]], bool], NoneType]) -> None:
112    def on_after_hide(self, handler: Callable[[List[Dict[str, Any]], bool], None]) -> None:
113        """Fires after the control is hidden."""
114        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_remove(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
116    def on_after_remove(self, handler: Callable[[Dict[str, Any]], None]) -> None:
117        """Fires after a file is removed from the data collection."""
118        self.add_event_handler('afterRemove', handler)

Fires after a file is removed from the data collection.

def on_after_show(self, handler: Callable[[List[Dict[str, Any]]], NoneType]) -> None:
120    def on_after_show(self, handler: Callable[[List[Dict[str, Any]]], None]) -> None:
121        """Fires after the control is shown."""
122        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_after_validate(self, handler: Callable[[List[Dict[str, Any]], bool], NoneType]) -> None:
124    def on_after_validate(self, handler: Callable[[List[Dict[str, Any]], bool], None]) -> None:
125        """Fires after the control value is validated."""
126        self.add_event_handler('afterValidate', handler)

Fires after the control value is validated.

def on_before_add(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
128    def on_before_add(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
129        """Fires before a file is added to the data collection."""
130        def event_handler(file):
131            result = handler(file.to_py())
132            if result is False:
133                return js.Boolean(False)
134        self.simplevault.events.on('beforeAdd', create_proxy(event_handler))

Fires before a file is added to the data collection.

def on_before_change( self, handler: Callable[[List[Dict[str, Any]], Dict[str, Any]], Optional[bool]]) -> None:
136    def on_before_change(self, handler: Callable[[List[Dict[str, Any]], Dict[str, Any]], Union[bool, None]]) -> None:
137        """Fires before changing the value of the control."""
138        def event_handler(value, file=None):
139            value_py = [item.to_py() for item in value]
140            file_py = file.to_py() if file else None
141            result = handler(value_py, file_py)
142            if result is False:
143                return js.Boolean(False)
144        self.simplevault.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
146    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
147        """Fires before configuration attributes are changed dynamically."""
148        def event_handler(properties):
149            result = handler(properties.to_py())
150            if result is False:
151                return js.Boolean(False)
152        self.simplevault.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide( self, handler: Callable[[List[Dict[str, Any]], bool], Optional[bool]]) -> None:
154    def on_before_hide(self, handler: Callable[[List[Dict[str, Any]], bool], Union[bool, None]]) -> None:
155        """Fires before the control is hidden."""
156        def event_handler(value, init):
157            value_py = [item.to_py() for item in value]
158            result = handler(value_py, init)
159            if result is False:
160                return js.Boolean(False)
161        self.simplevault.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_remove(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
163    def on_before_remove(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
164        """Fires before a file is removed from the data collection."""
165        def event_handler(file):
166            result = handler(file.to_py())
167            if result is False:
168                return js.Boolean(False)
169        self.simplevault.events.on('beforeRemove', create_proxy(event_handler))

Fires before a file is removed from the data collection.

def on_before_show(self, handler: Callable[[List[Dict[str, Any]]], Optional[bool]]) -> None:
171    def on_before_show(self, handler: Callable[[List[Dict[str, Any]]], Union[bool, None]]) -> None:
172        """Fires before the control is shown."""
173        def event_handler(value):
174            value_py = [item.to_py() for item in value]
175            result = handler(value_py)
176            if result is False:
177                return js.Boolean(False)
178        self.simplevault.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

def on_before_upload_file( self, handler: Callable[[Dict[str, Any], List[Dict[str, Any]]], Optional[bool]]) -> None:
180    def on_before_upload_file(self, handler: Callable[[Dict[str, Any], List[Dict[str, Any]]], Union[bool, None]]) -> None:
181        """Fires before file upload begins."""
182        def event_handler(file, value):
183            file_py = file.to_py()
184            value_py = [item.to_py() for item in value]
185            result = handler(file_py, value_py)
186            if result is False:
187                return js.Boolean(False)
188        self.simplevault.events.on('beforeUploadFile', create_proxy(event_handler))

Fires before file upload begins.

def on_before_validate(self, handler: Callable[[List[Dict[str, Any]]], Optional[bool]]) -> None:
190    def on_before_validate(self, handler: Callable[[List[Dict[str, Any]]], Union[bool, None]]) -> None:
191        """Fires before the control value is validated."""
192        def event_handler(value):
193            value_py = [item.to_py() for item in value]
194            result = handler(value_py)
195            if result is False:
196                return js.Boolean(False)
197        self.simplevault.events.on('beforeValidate', create_proxy(event_handler))

Fires before the control value is validated.

def on_change(self, handler: Callable[[List[Dict[str, Any]]], NoneType]) -> None:
199    def on_change(self, handler: Callable[[List[Dict[str, Any]]], None]) -> None:
200        """Fires on changing the value of the control."""
201        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_upload_begin( self, handler: Callable[[List[Dict[str, Any]], List[Dict[str, Any]]], NoneType]) -> None:
203    def on_upload_begin(self, handler: Callable[[List[Dict[str, Any]], List[Dict[str, Any]]], None]) -> None:
204        """Fires when file upload begins."""
205        self.add_event_handler('uploadBegin', handler)

Fires when file upload begins.

def on_upload_complete( self, handler: Callable[[List[Dict[str, Any]], List[Dict[str, Any]]], NoneType]) -> None:
207    def on_upload_complete(self, handler: Callable[[List[Dict[str, Any]], List[Dict[str, Any]]], None]) -> None:
208        """Fires when upload is completed."""
209        self.add_event_handler('uploadComplete', handler)

Fires when upload is completed.

def on_upload_fail( self, handler: Callable[[Dict[str, Any], List[Dict[str, Any]]], NoneType]) -> None:
211    def on_upload_fail(self, handler: Callable[[Dict[str, Any], List[Dict[str, Any]]], None]) -> None:
212        """Fires if the file upload failed."""
213        self.add_event_handler('uploadFail', handler)

Fires if the file upload failed.

def on_upload_file( self, handler: Callable[[Dict[str, Any], List[Dict[str, Any]], Dict[str, Any]], NoneType]) -> None:
215    def on_upload_file(self, handler: Callable[[Dict[str, Any], List[Dict[str, Any]], Dict[str, Any]], None]) -> None:
216        """Fires when a file has been uploaded."""
217        self.add_event_handler('uploadFile', handler)

Fires when a file has been uploaded.

def on_upload_progress(self, handler: Callable[[int, List[Dict[str, Any]]], NoneType]) -> None:
219    def on_upload_progress(self, handler: Callable[[int, List[Dict[str, Any]]], None]) -> None:
220        """Fires on each percent of files uploading."""
221        self.add_event_handler('uploadProgress', handler)

Fires on each percent of files uploading.

class Slider:
 14class Slider:
 15    def __init__(self, config: SliderConfig = None, widget_parent: Any = None):
 16        """Initializes the Slider control."""
 17        if config is None:
 18            config = SliderConfig()
 19        config_dict = config.to_dict()
 20        self.slider = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ Slider API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from a thumb of a Slider control."""
 26        self.slider.blur()
 27
 28    def clear(self) -> None:
 29        """Clears the value of the Slider control."""
 30        self.slider.clear()
 31
 32    def destructor(self) -> None:
 33        """Removes the Slider instance and releases the occupied resources."""
 34        self.slider.destructor()
 35
 36    def disable(self) -> None:
 37        """Disables the Slider control."""
 38        self.slider.disable()
 39
 40    def enable(self) -> None:
 41        """Enables the Slider control."""
 42        self.slider.enable()
 43
 44    def focus(self, extra: bool = False) -> None:
 45        """Sets focus to a thumb of a Slider control."""
 46        self.slider.focus(extra)
 47
 48    def get_properties(self) -> Dict[str, Any]:
 49        """Returns the configuration attributes of the control."""
 50        return self.slider.getProperties().to_py()
 51
 52    def get_value(self) -> List[float]:
 53        """Returns the current value of the Slider control."""
 54        return self.slider.getValue().to_py()
 55
 56    def get_widget(self) -> Any:
 57        """Returns the DHTMLX Slider widget attached to a Slider control."""
 58        return self.slider.getWidget()
 59
 60    def hide(self) -> None:
 61        """Hides the Slider control."""
 62        self.slider.hide()
 63
 64    def is_disabled(self) -> bool:
 65        """Checks whether the Slider control is disabled."""
 66        return self.slider.isDisabled()
 67
 68    def is_visible(self) -> bool:
 69        """Checks whether the Slider control is visible on the page."""
 70        return self.slider.isVisible()
 71
 72    def set_properties(self, properties: Dict[str, Any]) -> None:
 73        """Allows changing configuration attributes of the control dynamically."""
 74        self.slider.setProperties(js.JSON.parse(json.dumps(properties)))
 75
 76    def set_value(self, value: Union[float, List[float]]) -> None:
 77        """Sets the value for the Slider control."""
 78        self.slider.setValue(value)
 79
 80    def show(self) -> None:
 81        """Shows the Slider control on the page."""
 82        self.slider.show()
 83
 84    """ Slider Events """
 85
 86    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 87        """Helper to add event handlers dynamically."""
 88        event_proxy = create_proxy(handler)
 89        self.slider.events.on(event_name, event_proxy)
 90
 91    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
 92        """Fires after configuration attributes have been changed dynamically."""
 93        self.add_event_handler('afterChangeProperties', handler)
 94
 95    def on_after_hide(self, handler: Callable[[List[float], bool], None]) -> None:
 96        """Fires after the control is hidden."""
 97        self.add_event_handler('afterHide', handler)
 98
 99    def on_after_show(self, handler: Callable[[List[float]], None]) -> None:
100        """Fires after the control is shown."""
101        self.add_event_handler('afterShow', handler)
102
103    def on_before_change(self, handler: Callable[[List[float]], Union[bool, None]]) -> None:
104        """Fires before changing the value of the control."""
105        def event_handler(value):
106            result = handler(value.to_py())
107            if result is False:
108                return js.Boolean(False)
109        self.slider.events.on('beforeChange', create_proxy(event_handler))
110
111    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
112        """Fires before configuration attributes are changed dynamically."""
113        def event_handler(properties):
114            result = handler(properties.to_py())
115            if result is False:
116                return js.Boolean(False)
117        self.slider.events.on('beforeChangeProperties', create_proxy(event_handler))
118
119    def on_before_hide(self, handler: Callable[[List[float], bool], Union[bool, None]]) -> None:
120        """Fires before the control is hidden."""
121        def event_handler(value, init):
122            result = handler(value.to_py(), init)
123            if result is False:
124                return js.Boolean(False)
125        self.slider.events.on('beforeHide', create_proxy(event_handler))
126
127    def on_before_show(self, handler: Callable[[List[float]], Union[bool, None]]) -> None:
128        """Fires before the control is shown."""
129        def event_handler(value):
130            result = handler(value.to_py())
131            if result is False:
132                return js.Boolean(False)
133        self.slider.events.on('beforeShow', create_proxy(event_handler))
134
135    def on_blur(self, handler: Callable[[List[float]], None]) -> None:
136        """Fires when the Slider control has lost focus."""
137        self.add_event_handler('blur', handler)
138
139    def on_change(self, handler: Callable[[List[float]], None]) -> None:
140        """Fires on changing the value of the control."""
141        self.add_event_handler('change', handler)
142
143    def on_focus(self, handler: Callable[[List[float]], None]) -> None:
144        """Fires when the Slider control has received focus."""
145        self.add_event_handler('focus', handler)
146
147    def on_keydown(self, handler: Callable[[Any], None]) -> None:
148        """Fires when any key is pressed and the Slider control is in focus."""
149        self.add_event_handler('keydown', handler)
Slider( config: SliderConfig = None, widget_parent: Any = None)
15    def __init__(self, config: SliderConfig = None, widget_parent: Any = None):
16        """Initializes the Slider control."""
17        if config is None:
18            config = SliderConfig()
19        config_dict = config.to_dict()
20        self.slider = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Slider control.

slider

Slider API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from a thumb of a Slider control."""
26        self.slider.blur()

Removes focus from a thumb of a Slider control.

def clear(self) -> None:
28    def clear(self) -> None:
29        """Clears the value of the Slider control."""
30        self.slider.clear()

Clears the value of the Slider control.

def destructor(self) -> None:
32    def destructor(self) -> None:
33        """Removes the Slider instance and releases the occupied resources."""
34        self.slider.destructor()

Removes the Slider instance and releases the occupied resources.

def disable(self) -> None:
36    def disable(self) -> None:
37        """Disables the Slider control."""
38        self.slider.disable()

Disables the Slider control.

def enable(self) -> None:
40    def enable(self) -> None:
41        """Enables the Slider control."""
42        self.slider.enable()

Enables the Slider control.

def focus(self, extra: bool = False) -> None:
44    def focus(self, extra: bool = False) -> None:
45        """Sets focus to a thumb of a Slider control."""
46        self.slider.focus(extra)

Sets focus to a thumb of a Slider control.

def get_properties(self) -> Dict[str, Any]:
48    def get_properties(self) -> Dict[str, Any]:
49        """Returns the configuration attributes of the control."""
50        return self.slider.getProperties().to_py()

Returns the configuration attributes of the control.

def get_value(self) -> List[float]:
52    def get_value(self) -> List[float]:
53        """Returns the current value of the Slider control."""
54        return self.slider.getValue().to_py()

Returns the current value of the Slider control.

def get_widget(self) -> Any:
56    def get_widget(self) -> Any:
57        """Returns the DHTMLX Slider widget attached to a Slider control."""
58        return self.slider.getWidget()

Returns the DHTMLX Slider widget attached to a Slider control.

def hide(self) -> None:
60    def hide(self) -> None:
61        """Hides the Slider control."""
62        self.slider.hide()

Hides the Slider control.

def is_disabled(self) -> bool:
64    def is_disabled(self) -> bool:
65        """Checks whether the Slider control is disabled."""
66        return self.slider.isDisabled()

Checks whether the Slider control is disabled.

def is_visible(self) -> bool:
68    def is_visible(self) -> bool:
69        """Checks whether the Slider control is visible on the page."""
70        return self.slider.isVisible()

Checks whether the Slider control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
72    def set_properties(self, properties: Dict[str, Any]) -> None:
73        """Allows changing configuration attributes of the control dynamically."""
74        self.slider.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def set_value(self, value: Union[float, List[float]]) -> None:
76    def set_value(self, value: Union[float, List[float]]) -> None:
77        """Sets the value for the Slider control."""
78        self.slider.setValue(value)

Sets the value for the Slider control.

def show(self) -> None:
80    def show(self) -> None:
81        """Shows the Slider control on the page."""
82        self.slider.show()

Shows the Slider control on the page.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
86    def add_event_handler(self, event_name: str, handler: Callable) -> None:
87        """Helper to add event handlers dynamically."""
88        event_proxy = create_proxy(handler)
89        self.slider.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
91    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
92        """Fires after configuration attributes have been changed dynamically."""
93        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[List[float], bool], NoneType]) -> None:
95    def on_after_hide(self, handler: Callable[[List[float], bool], None]) -> None:
96        """Fires after the control is hidden."""
97        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show(self, handler: Callable[[List[float]], NoneType]) -> None:
 99    def on_after_show(self, handler: Callable[[List[float]], None]) -> None:
100        """Fires after the control is shown."""
101        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_before_change(self, handler: Callable[[List[float]], Optional[bool]]) -> None:
103    def on_before_change(self, handler: Callable[[List[float]], Union[bool, None]]) -> None:
104        """Fires before changing the value of the control."""
105        def event_handler(value):
106            result = handler(value.to_py())
107            if result is False:
108                return js.Boolean(False)
109        self.slider.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
111    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
112        """Fires before configuration attributes are changed dynamically."""
113        def event_handler(properties):
114            result = handler(properties.to_py())
115            if result is False:
116                return js.Boolean(False)
117        self.slider.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide(self, handler: Callable[[List[float], bool], Optional[bool]]) -> None:
119    def on_before_hide(self, handler: Callable[[List[float], bool], Union[bool, None]]) -> None:
120        """Fires before the control is hidden."""
121        def event_handler(value, init):
122            result = handler(value.to_py(), init)
123            if result is False:
124                return js.Boolean(False)
125        self.slider.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show(self, handler: Callable[[List[float]], Optional[bool]]) -> None:
127    def on_before_show(self, handler: Callable[[List[float]], Union[bool, None]]) -> None:
128        """Fires before the control is shown."""
129        def event_handler(value):
130            result = handler(value.to_py())
131            if result is False:
132                return js.Boolean(False)
133        self.slider.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

def on_blur(self, handler: Callable[[List[float]], NoneType]) -> None:
135    def on_blur(self, handler: Callable[[List[float]], None]) -> None:
136        """Fires when the Slider control has lost focus."""
137        self.add_event_handler('blur', handler)

Fires when the Slider control has lost focus.

def on_change(self, handler: Callable[[List[float]], NoneType]) -> None:
139    def on_change(self, handler: Callable[[List[float]], None]) -> None:
140        """Fires on changing the value of the control."""
141        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_focus(self, handler: Callable[[List[float]], NoneType]) -> None:
143    def on_focus(self, handler: Callable[[List[float]], None]) -> None:
144        """Fires when the Slider control has received focus."""
145        self.add_event_handler('focus', handler)

Fires when the Slider control has received focus.

def on_keydown(self, handler: Callable[[Any], NoneType]) -> None:
147    def on_keydown(self, handler: Callable[[Any], None]) -> None:
148        """Fires when any key is pressed and the Slider control is in focus."""
149        self.add_event_handler('keydown', handler)

Fires when any key is pressed and the Slider control is in focus.

class Spacer:
14class Spacer:
15    def __init__(self, config: SpacerConfig = None, widget_parent: Any = None):
16        """Initializes the Spacer control."""
17        if config is None:
18            config = SpacerConfig()
19        config_dict = config.to_dict()
20        self.spacer = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
21
22    """ Spacer API Functions """
23
24    def destructor(self) -> None:
25        """Removes the Spacer instance and releases the occupied resources."""
26        self.spacer.destructor()
27
28    def get_properties(self) -> Dict[str, Any]:
29        """Returns the configuration attributes of the control."""
30        return self.spacer.getProperties().to_py()
31
32    def hide(self) -> None:
33        """Hides the Spacer control."""
34        self.spacer.hide()
35
36    def is_visible(self) -> bool:
37        """Checks whether the Spacer control is visible on the page."""
38        return self.spacer.isVisible()
39
40    def set_properties(self, properties: Dict[str, Any]) -> None:
41        """Allows changing configuration attributes of the control dynamically."""
42        self.spacer.setProperties(js.JSON.parse(json.dumps(properties)))
43
44    def show(self) -> None:
45        """Shows the Spacer control on the page."""
46        self.spacer.show()
47
48    """ Spacer Events """
49
50    def add_event_handler(self, event_name: str, handler: Callable) -> None:
51        """Helper to add event handlers dynamically."""
52        event_proxy = create_proxy(handler)
53        self.spacer.events.on(event_name, event_proxy)
54
55    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
56        """Fires after configuration attributes have been changed dynamically."""
57        self.add_event_handler('afterChangeProperties', handler)
58
59    def on_after_hide(self, handler: Callable[[bool], None]) -> None:
60        """Fires after the control is hidden."""
61        self.add_event_handler('afterHide', handler)
62
63    def on_after_show(self, handler: Callable[[], None]) -> None:
64        """Fires after the control is shown."""
65        self.add_event_handler('afterShow', handler)
66
67    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
68        """Fires before configuration attributes are changed dynamically."""
69        def event_handler(properties):
70            result = handler(properties.to_py())
71            if result is False:
72                return js.Boolean(False)
73        self.spacer.events.on('beforeChangeProperties', create_proxy(event_handler))
74
75    def on_before_hide(self, handler: Callable[[bool], Union[bool, None]]) -> None:
76        """Fires before the control is hidden."""
77        def event_handler(init):
78            result = handler(init)
79            if result is False:
80                return js.Boolean(False)
81        self.spacer.events.on('beforeHide', create_proxy(event_handler))
82
83    def on_before_show(self, handler: Callable[[], Union[bool, None]]) -> None:
84        """Fires before the control is shown."""
85        def event_handler():
86            result = handler()
87            if result is False:
88                return js.Boolean(False)
89        self.spacer.events.on('beforeShow', create_proxy(event_handler))
Spacer( config: SpacerConfig = None, widget_parent: Any = None)
15    def __init__(self, config: SpacerConfig = None, widget_parent: Any = None):
16        """Initializes the Spacer control."""
17        if config is None:
18            config = SpacerConfig()
19        config_dict = config.to_dict()
20        self.spacer = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Spacer control.

spacer

Spacer API Functions

def destructor(self) -> None:
24    def destructor(self) -> None:
25        """Removes the Spacer instance and releases the occupied resources."""
26        self.spacer.destructor()

Removes the Spacer instance and releases the occupied resources.

def get_properties(self) -> Dict[str, Any]:
28    def get_properties(self) -> Dict[str, Any]:
29        """Returns the configuration attributes of the control."""
30        return self.spacer.getProperties().to_py()

Returns the configuration attributes of the control.

def hide(self) -> None:
32    def hide(self) -> None:
33        """Hides the Spacer control."""
34        self.spacer.hide()

Hides the Spacer control.

def is_visible(self) -> bool:
36    def is_visible(self) -> bool:
37        """Checks whether the Spacer control is visible on the page."""
38        return self.spacer.isVisible()

Checks whether the Spacer control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
40    def set_properties(self, properties: Dict[str, Any]) -> None:
41        """Allows changing configuration attributes of the control dynamically."""
42        self.spacer.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def show(self) -> None:
44    def show(self) -> None:
45        """Shows the Spacer control on the page."""
46        self.spacer.show()

Shows the Spacer control on the page.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
50    def add_event_handler(self, event_name: str, handler: Callable) -> None:
51        """Helper to add event handlers dynamically."""
52        event_proxy = create_proxy(handler)
53        self.spacer.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
55    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
56        """Fires after configuration attributes have been changed dynamically."""
57        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[bool], NoneType]) -> None:
59    def on_after_hide(self, handler: Callable[[bool], None]) -> None:
60        """Fires after the control is hidden."""
61        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show(self, handler: Callable[[], NoneType]) -> None:
63    def on_after_show(self, handler: Callable[[], None]) -> None:
64        """Fires after the control is shown."""
65        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
67    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
68        """Fires before configuration attributes are changed dynamically."""
69        def event_handler(properties):
70            result = handler(properties.to_py())
71            if result is False:
72                return js.Boolean(False)
73        self.spacer.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide(self, handler: Callable[[bool], Optional[bool]]) -> None:
75    def on_before_hide(self, handler: Callable[[bool], Union[bool, None]]) -> None:
76        """Fires before the control is hidden."""
77        def event_handler(init):
78            result = handler(init)
79            if result is False:
80                return js.Boolean(False)
81        self.spacer.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show(self, handler: Callable[[], Optional[bool]]) -> None:
83    def on_before_show(self, handler: Callable[[], Union[bool, None]]) -> None:
84        """Fires before the control is shown."""
85        def event_handler():
86            result = handler()
87            if result is False:
88                return js.Boolean(False)
89        self.spacer.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

class Text:
 14class Text:
 15    def __init__(self, config: TextConfig = None, widget_parent: Any = None):
 16        """Initializes the Text control."""
 17        if config is None:
 18            config = TextConfig()
 19        config_dict = config.to_dict()
 20        self.text = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ Text API Functions """
 23
 24    def clear(self) -> None:
 25        """Clears the value of the Text control."""
 26        self.text.clear()
 27
 28    def destructor(self) -> None:
 29        """Removes the Text instance and releases the occupied resources."""
 30        self.text.destructor()
 31
 32    def disable(self) -> None:
 33        """Disables the Text control."""
 34        self.text.disable()
 35
 36    def enable(self) -> None:
 37        """Enables the Text control."""
 38        self.text.enable()
 39
 40    def get_properties(self) -> Dict[str, Any]:
 41        """Returns the configuration attributes of the control."""
 42        return self.text.getProperties().to_py()
 43
 44    def get_value(self) -> Union[str, int]:
 45        """Returns the current value of the Text control."""
 46        return self.text.getValue()
 47
 48    def hide(self) -> None:
 49        """Hides the Text control."""
 50        self.text.hide()
 51
 52    def is_disabled(self) -> bool:
 53        """Checks whether the Text control is disabled."""
 54        return self.text.isDisabled()
 55
 56    def is_visible(self) -> bool:
 57        """Checks whether the Text control is visible on the page."""
 58        return self.text.isVisible()
 59
 60    def set_properties(self, properties: Dict[str, Any]) -> None:
 61        """Allows changing configuration attributes of the control dynamically."""
 62        self.text.setProperties(js.JSON.parse(json.dumps(properties)))
 63
 64    def set_value(self, value: Union[str, int]) -> None:
 65        """Sets the value for the Text control."""
 66        self.text.setValue(value)
 67
 68    def show(self) -> None:
 69        """Shows the Text control on the page."""
 70        self.text.show()
 71
 72    """ Text Events """
 73
 74    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 75        """Helper to add event handlers dynamically."""
 76        event_proxy = create_proxy(handler)
 77        self.text.events.on(event_name, event_proxy)
 78
 79    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
 80        """Fires after configuration attributes have been changed dynamically."""
 81        self.add_event_handler('afterChangeProperties', handler)
 82
 83    def on_after_hide(self, handler: Callable[[Union[str, int], bool], None]) -> None:
 84        """Fires after the control is hidden."""
 85        self.add_event_handler('afterHide', handler)
 86
 87    def on_after_show(self, handler: Callable[[Union[str, int]], None]) -> None:
 88        """Fires after the control is shown."""
 89        self.add_event_handler('afterShow', handler)
 90
 91    def on_after_validate(self, handler: Callable[[Union[str, int], bool], None]) -> None:
 92        """Fires after the control value is validated."""
 93        self.add_event_handler('afterValidate', handler)
 94
 95    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
 96        """Fires before configuration attributes are changed dynamically."""
 97        def event_handler(properties):
 98            result = handler(properties.to_py())
 99            if result is False:
100                return js.Boolean(False)
101        self.text.events.on('beforeChangeProperties', create_proxy(event_handler))
102
103    def on_before_hide(self, handler: Callable[[Union[str, int], bool], Union[bool, None]]) -> None:
104        """Fires before the control is hidden."""
105        def event_handler(value, init):
106            result = handler(value, init)
107            if result is False:
108                return js.Boolean(False)
109        self.text.events.on('beforeHide', create_proxy(event_handler))
110
111    def on_before_show(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
112        """Fires before the control is shown."""
113        def event_handler(value):
114            result = handler(value)
115            if result is False:
116                return js.Boolean(False)
117        self.text.events.on('beforeShow', create_proxy(event_handler))
118
119    def on_before_validate(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
120        """Fires before the control value is validated."""
121        def event_handler(value):
122            result = handler(value)
123            if result is False:
124                return js.Boolean(False)
125        self.text.events.on('beforeValidate', create_proxy(event_handler))
126
127    def on_change(self, handler: Callable[[Union[str, int]], None]) -> None:
128        """Fires on changing the value of the control."""
129        self.add_event_handler('change', handler)
Text( config: TextConfig = None, widget_parent: Any = None)
15    def __init__(self, config: TextConfig = None, widget_parent: Any = None):
16        """Initializes the Text control."""
17        if config is None:
18            config = TextConfig()
19        config_dict = config.to_dict()
20        self.text = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Text control.

text

Text API Functions

def clear(self) -> None:
24    def clear(self) -> None:
25        """Clears the value of the Text control."""
26        self.text.clear()

Clears the value of the Text control.

def destructor(self) -> None:
28    def destructor(self) -> None:
29        """Removes the Text instance and releases the occupied resources."""
30        self.text.destructor()

Removes the Text instance and releases the occupied resources.

def disable(self) -> None:
32    def disable(self) -> None:
33        """Disables the Text control."""
34        self.text.disable()

Disables the Text control.

def enable(self) -> None:
36    def enable(self) -> None:
37        """Enables the Text control."""
38        self.text.enable()

Enables the Text control.

def get_properties(self) -> Dict[str, Any]:
40    def get_properties(self) -> Dict[str, Any]:
41        """Returns the configuration attributes of the control."""
42        return self.text.getProperties().to_py()

Returns the configuration attributes of the control.

def get_value(self) -> Union[str, int]:
44    def get_value(self) -> Union[str, int]:
45        """Returns the current value of the Text control."""
46        return self.text.getValue()

Returns the current value of the Text control.

def hide(self) -> None:
48    def hide(self) -> None:
49        """Hides the Text control."""
50        self.text.hide()

Hides the Text control.

def is_disabled(self) -> bool:
52    def is_disabled(self) -> bool:
53        """Checks whether the Text control is disabled."""
54        return self.text.isDisabled()

Checks whether the Text control is disabled.

def is_visible(self) -> bool:
56    def is_visible(self) -> bool:
57        """Checks whether the Text control is visible on the page."""
58        return self.text.isVisible()

Checks whether the Text control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
60    def set_properties(self, properties: Dict[str, Any]) -> None:
61        """Allows changing configuration attributes of the control dynamically."""
62        self.text.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def set_value(self, value: Union[str, int]) -> None:
64    def set_value(self, value: Union[str, int]) -> None:
65        """Sets the value for the Text control."""
66        self.text.setValue(value)

Sets the value for the Text control.

def show(self) -> None:
68    def show(self) -> None:
69        """Shows the Text control on the page."""
70        self.text.show()

Shows the Text control on the page.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
74    def add_event_handler(self, event_name: str, handler: Callable) -> None:
75        """Helper to add event handlers dynamically."""
76        event_proxy = create_proxy(handler)
77        self.text.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
79    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
80        """Fires after configuration attributes have been changed dynamically."""
81        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[Union[str, int], bool], NoneType]) -> None:
83    def on_after_hide(self, handler: Callable[[Union[str, int], bool], None]) -> None:
84        """Fires after the control is hidden."""
85        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show(self, handler: Callable[[Union[str, int]], NoneType]) -> None:
87    def on_after_show(self, handler: Callable[[Union[str, int]], None]) -> None:
88        """Fires after the control is shown."""
89        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_after_validate(self, handler: Callable[[Union[str, int], bool], NoneType]) -> None:
91    def on_after_validate(self, handler: Callable[[Union[str, int], bool], None]) -> None:
92        """Fires after the control value is validated."""
93        self.add_event_handler('afterValidate', handler)

Fires after the control value is validated.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
 95    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
 96        """Fires before configuration attributes are changed dynamically."""
 97        def event_handler(properties):
 98            result = handler(properties.to_py())
 99            if result is False:
100                return js.Boolean(False)
101        self.text.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide(self, handler: Callable[[Union[str, int], bool], Optional[bool]]) -> None:
103    def on_before_hide(self, handler: Callable[[Union[str, int], bool], Union[bool, None]]) -> None:
104        """Fires before the control is hidden."""
105        def event_handler(value, init):
106            result = handler(value, init)
107            if result is False:
108                return js.Boolean(False)
109        self.text.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show(self, handler: Callable[[Union[str, int]], Optional[bool]]) -> None:
111    def on_before_show(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
112        """Fires before the control is shown."""
113        def event_handler(value):
114            result = handler(value)
115            if result is False:
116                return js.Boolean(False)
117        self.text.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

def on_before_validate(self, handler: Callable[[Union[str, int]], Optional[bool]]) -> None:
119    def on_before_validate(self, handler: Callable[[Union[str, int]], Union[bool, None]]) -> None:
120        """Fires before the control value is validated."""
121        def event_handler(value):
122            result = handler(value)
123            if result is False:
124                return js.Boolean(False)
125        self.text.events.on('beforeValidate', create_proxy(event_handler))

Fires before the control value is validated.

def on_change(self, handler: Callable[[Union[str, int]], NoneType]) -> None:
127    def on_change(self, handler: Callable[[Union[str, int]], None]) -> None:
128        """Fires on changing the value of the control."""
129        self.add_event_handler('change', handler)

Fires on changing the value of the control.

class Textarea:
 14class Textarea:
 15    def __init__(self, config: TextareaConfig = None, widget_parent: Any = None):
 16        """Initializes the Textarea control."""
 17        if config is None:
 18            config = TextareaConfig()
 19        config_dict = config.to_dict()
 20        self.textarea = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ Textarea API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from the Textarea control."""
 26        self.textarea.blur()
 27
 28    def clear(self) -> None:
 29        """Clears the value of the Textarea control."""
 30        self.textarea.clear()
 31
 32    def clear_validate(self) -> None:
 33        """Clears validation of the Textarea control."""
 34        self.textarea.clearValidate()
 35
 36    def destructor(self) -> None:
 37        """Removes the Textarea instance and releases the occupied resources."""
 38        self.textarea.destructor()
 39
 40    def disable(self) -> None:
 41        """Disables the Textarea control."""
 42        self.textarea.disable()
 43
 44    def enable(self) -> None:
 45        """Enables the Textarea control."""
 46        self.textarea.enable()
 47
 48    def focus(self) -> None:
 49        """Sets focus to the Textarea control."""
 50        self.textarea.focus()
 51
 52    def get_properties(self) -> Dict[str, Any]:
 53        """Returns the configuration attributes of the control."""
 54        return self.textarea.getProperties().to_py()
 55
 56    def get_value(self) -> str:
 57        """Returns the current value of the Textarea control."""
 58        return self.textarea.getValue()
 59
 60    def hide(self) -> None:
 61        """Hides the Textarea control."""
 62        self.textarea.hide()
 63
 64    def is_disabled(self) -> bool:
 65        """Checks whether the Textarea control is disabled."""
 66        return self.textarea.isDisabled()
 67
 68    def is_visible(self) -> bool:
 69        """Checks whether the Textarea control is visible on the page."""
 70        return self.textarea.isVisible()
 71
 72    def set_properties(self, properties: Dict[str, Any]) -> None:
 73        """Allows changing configuration attributes of the control dynamically."""
 74        self.textarea.setProperties(js.JSON.parse(json.dumps(properties)))
 75
 76    def set_value(self, value: str) -> None:
 77        """Sets the value for the Textarea control."""
 78        self.textarea.setValue(value)
 79
 80    def show(self) -> None:
 81        """Shows the Textarea control on the page."""
 82        self.textarea.show()
 83
 84    def validate(self, silent: bool = False, validate_value: str = None) -> bool:
 85        """Validates the Textarea control."""
 86        return self.textarea.validate(silent, validate_value)
 87
 88    """ Textarea Events """
 89
 90    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 91        """Helper to add event handlers dynamically."""
 92        event_proxy = create_proxy(handler)
 93        self.textarea.events.on(event_name, event_proxy)
 94
 95    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
 96        """Fires after configuration attributes have been changed dynamically."""
 97        self.add_event_handler('afterChangeProperties', handler)
 98
 99    def on_after_hide(self, handler: Callable[[str, bool], None]) -> None:
100        """Fires after the control is hidden."""
101        self.add_event_handler('afterHide', handler)
102
103    def on_after_show(self, handler: Callable[[str], None]) -> None:
104        """Fires after the control is shown."""
105        self.add_event_handler('afterShow', handler)
106
107    def on_after_validate(self, handler: Callable[[str, bool], None]) -> None:
108        """Fires after the control value is validated."""
109        self.add_event_handler('afterValidate', handler)
110
111    def on_before_change(self, handler: Callable[[str], Union[bool, None]]) -> None:
112        """Fires before changing the value of the control."""
113        def event_handler(value):
114            result = handler(value)
115            if result is False:
116                return js.Boolean(False)
117        self.textarea.events.on('beforeChange', create_proxy(event_handler))
118
119    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
120        """Fires before configuration attributes are changed dynamically."""
121        def event_handler(properties):
122            result = handler(properties.to_py())
123            if result is False:
124                return js.Boolean(False)
125        self.textarea.events.on('beforeChangeProperties', create_proxy(event_handler))
126
127    def on_before_hide(self, handler: Callable[[str, bool], Union[bool, None]]) -> None:
128        """Fires before the control is hidden."""
129        def event_handler(value, init):
130            result = handler(value, init)
131            if result is False:
132                return js.Boolean(False)
133        self.textarea.events.on('beforeHide', create_proxy(event_handler))
134
135    def on_before_show(self, handler: Callable[[str], Union[bool, None]]) -> None:
136        """Fires before the control is shown."""
137        def event_handler(value):
138            result = handler(value)
139            if result is False:
140                return js.Boolean(False)
141        self.textarea.events.on('beforeShow', create_proxy(event_handler))
142
143    def on_before_validate(self, handler: Callable[[str], Union[bool, None]]) -> None:
144        """Fires before the control value is validated."""
145        def event_handler(value):
146            result = handler(value)
147            if result is False:
148                return js.Boolean(False)
149        self.textarea.events.on('beforeValidate', create_proxy(event_handler))
150
151    def on_blur(self, handler: Callable[[str], None]) -> None:
152        """Fires when the Textarea control has lost focus."""
153        self.add_event_handler('blur', handler)
154
155    def on_change(self, handler: Callable[[str], None]) -> None:
156        """Fires on changing the value of the control."""
157        self.add_event_handler('change', handler)
158
159    def on_focus(self, handler: Callable[[str], None]) -> None:
160        """Fires when the Textarea control has received focus."""
161        self.add_event_handler('focus', handler)
162
163    def on_input(self, handler: Callable[[str], None]) -> None:
164        """Fires when a user types some text in the textarea."""
165        self.add_event_handler('input', handler)
166
167    def on_keydown(self, handler: Callable[[Any], None]) -> None:
168        """Fires when any key is pressed and the Textarea control is in focus."""
169        self.add_event_handler('keydown', handler)
Textarea( config: TextareaConfig = None, widget_parent: Any = None)
15    def __init__(self, config: TextareaConfig = None, widget_parent: Any = None):
16        """Initializes the Textarea control."""
17        if config is None:
18            config = TextareaConfig()
19        config_dict = config.to_dict()
20        self.textarea = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Textarea control.

textarea

Textarea API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from the Textarea control."""
26        self.textarea.blur()

Removes focus from the Textarea control.

def clear(self) -> None:
28    def clear(self) -> None:
29        """Clears the value of the Textarea control."""
30        self.textarea.clear()

Clears the value of the Textarea control.

def clear_validate(self) -> None:
32    def clear_validate(self) -> None:
33        """Clears validation of the Textarea control."""
34        self.textarea.clearValidate()

Clears validation of the Textarea control.

def destructor(self) -> None:
36    def destructor(self) -> None:
37        """Removes the Textarea instance and releases the occupied resources."""
38        self.textarea.destructor()

Removes the Textarea instance and releases the occupied resources.

def disable(self) -> None:
40    def disable(self) -> None:
41        """Disables the Textarea control."""
42        self.textarea.disable()

Disables the Textarea control.

def enable(self) -> None:
44    def enable(self) -> None:
45        """Enables the Textarea control."""
46        self.textarea.enable()

Enables the Textarea control.

def focus(self) -> None:
48    def focus(self) -> None:
49        """Sets focus to the Textarea control."""
50        self.textarea.focus()

Sets focus to the Textarea control.

def get_properties(self) -> Dict[str, Any]:
52    def get_properties(self) -> Dict[str, Any]:
53        """Returns the configuration attributes of the control."""
54        return self.textarea.getProperties().to_py()

Returns the configuration attributes of the control.

def get_value(self) -> str:
56    def get_value(self) -> str:
57        """Returns the current value of the Textarea control."""
58        return self.textarea.getValue()

Returns the current value of the Textarea control.

def hide(self) -> None:
60    def hide(self) -> None:
61        """Hides the Textarea control."""
62        self.textarea.hide()

Hides the Textarea control.

def is_disabled(self) -> bool:
64    def is_disabled(self) -> bool:
65        """Checks whether the Textarea control is disabled."""
66        return self.textarea.isDisabled()

Checks whether the Textarea control is disabled.

def is_visible(self) -> bool:
68    def is_visible(self) -> bool:
69        """Checks whether the Textarea control is visible on the page."""
70        return self.textarea.isVisible()

Checks whether the Textarea control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
72    def set_properties(self, properties: Dict[str, Any]) -> None:
73        """Allows changing configuration attributes of the control dynamically."""
74        self.textarea.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def set_value(self, value: str) -> None:
76    def set_value(self, value: str) -> None:
77        """Sets the value for the Textarea control."""
78        self.textarea.setValue(value)

Sets the value for the Textarea control.

def show(self) -> None:
80    def show(self) -> None:
81        """Shows the Textarea control on the page."""
82        self.textarea.show()

Shows the Textarea control on the page.

def validate(self, silent: bool = False, validate_value: str = None) -> bool:
84    def validate(self, silent: bool = False, validate_value: str = None) -> bool:
85        """Validates the Textarea control."""
86        return self.textarea.validate(silent, validate_value)

Validates the Textarea control.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
90    def add_event_handler(self, event_name: str, handler: Callable) -> None:
91        """Helper to add event handlers dynamically."""
92        event_proxy = create_proxy(handler)
93        self.textarea.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
95    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
96        """Fires after configuration attributes have been changed dynamically."""
97        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[str, bool], NoneType]) -> None:
 99    def on_after_hide(self, handler: Callable[[str, bool], None]) -> None:
100        """Fires after the control is hidden."""
101        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show(self, handler: Callable[[str], NoneType]) -> None:
103    def on_after_show(self, handler: Callable[[str], None]) -> None:
104        """Fires after the control is shown."""
105        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_after_validate(self, handler: Callable[[str, bool], NoneType]) -> None:
107    def on_after_validate(self, handler: Callable[[str, bool], None]) -> None:
108        """Fires after the control value is validated."""
109        self.add_event_handler('afterValidate', handler)

Fires after the control value is validated.

def on_before_change(self, handler: Callable[[str], Optional[bool]]) -> None:
111    def on_before_change(self, handler: Callable[[str], Union[bool, None]]) -> None:
112        """Fires before changing the value of the control."""
113        def event_handler(value):
114            result = handler(value)
115            if result is False:
116                return js.Boolean(False)
117        self.textarea.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
119    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
120        """Fires before configuration attributes are changed dynamically."""
121        def event_handler(properties):
122            result = handler(properties.to_py())
123            if result is False:
124                return js.Boolean(False)
125        self.textarea.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide(self, handler: Callable[[str, bool], Optional[bool]]) -> None:
127    def on_before_hide(self, handler: Callable[[str, bool], Union[bool, None]]) -> None:
128        """Fires before the control is hidden."""
129        def event_handler(value, init):
130            result = handler(value, init)
131            if result is False:
132                return js.Boolean(False)
133        self.textarea.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show(self, handler: Callable[[str], Optional[bool]]) -> None:
135    def on_before_show(self, handler: Callable[[str], Union[bool, None]]) -> None:
136        """Fires before the control is shown."""
137        def event_handler(value):
138            result = handler(value)
139            if result is False:
140                return js.Boolean(False)
141        self.textarea.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

def on_before_validate(self, handler: Callable[[str], Optional[bool]]) -> None:
143    def on_before_validate(self, handler: Callable[[str], Union[bool, None]]) -> None:
144        """Fires before the control value is validated."""
145        def event_handler(value):
146            result = handler(value)
147            if result is False:
148                return js.Boolean(False)
149        self.textarea.events.on('beforeValidate', create_proxy(event_handler))

Fires before the control value is validated.

def on_blur(self, handler: Callable[[str], NoneType]) -> None:
151    def on_blur(self, handler: Callable[[str], None]) -> None:
152        """Fires when the Textarea control has lost focus."""
153        self.add_event_handler('blur', handler)

Fires when the Textarea control has lost focus.

def on_change(self, handler: Callable[[str], NoneType]) -> None:
155    def on_change(self, handler: Callable[[str], None]) -> None:
156        """Fires on changing the value of the control."""
157        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_focus(self, handler: Callable[[str], NoneType]) -> None:
159    def on_focus(self, handler: Callable[[str], None]) -> None:
160        """Fires when the Textarea control has received focus."""
161        self.add_event_handler('focus', handler)

Fires when the Textarea control has received focus.

def on_input(self, handler: Callable[[str], NoneType]) -> None:
163    def on_input(self, handler: Callable[[str], None]) -> None:
164        """Fires when a user types some text in the textarea."""
165        self.add_event_handler('input', handler)

Fires when a user types some text in the textarea.

def on_keydown(self, handler: Callable[[Any], NoneType]) -> None:
167    def on_keydown(self, handler: Callable[[Any], None]) -> None:
168        """Fires when any key is pressed and the Textarea control is in focus."""
169        self.add_event_handler('keydown', handler)

Fires when any key is pressed and the Textarea control is in focus.

class Timepicker:
 14class Timepicker:
 15    def __init__(self, config: TimepickerConfig = None, widget_parent: Any = None):
 16        """Initializes the TimePicker control."""
 17        if config is None:
 18            config = TimepickerConfig()
 19        config_dict = config.to_dict()
 20        self.timepicker = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ TimePicker API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from the TimePicker control."""
 26        self.timepicker.blur()
 27
 28    def clear(self) -> None:
 29        """Clears the value of the TimePicker control."""
 30        self.timepicker.clear()
 31
 32    def clear_validate(self) -> None:
 33        """Clears validation of the TimePicker control."""
 34        self.timepicker.clearValidate()
 35
 36    def destructor(self) -> None:
 37        """Removes the TimePicker instance and releases the occupied resources."""
 38        self.timepicker.destructor()
 39
 40    def disable(self) -> None:
 41        """Disables the TimePicker control."""
 42        self.timepicker.disable()
 43
 44    def enable(self) -> None:
 45        """Enables the TimePicker control."""
 46        self.timepicker.enable()
 47
 48    def focus(self) -> None:
 49        """Sets focus to the TimePicker control."""
 50        self.timepicker.focus()
 51
 52    def get_properties(self) -> Dict[str, Any]:
 53        """Returns the configuration attributes of the control."""
 54        return self.timepicker.getProperties().to_py()
 55
 56    def get_value(self, as_object: bool = False) -> Union[str, Dict[str, Any]]:
 57        """Returns the current value of the TimePicker control."""
 58        return self.timepicker.getValue(as_object)
 59
 60    def get_widget(self) -> Any:
 61        """Returns the DHTMLX TimePicker widget attached to the TimePicker control."""
 62        return self.timepicker.getWidget()
 63
 64    def hide(self) -> None:
 65        """Hides the TimePicker control."""
 66        self.timepicker.hide()
 67
 68    def is_disabled(self) -> bool:
 69        """Checks whether the TimePicker control is disabled."""
 70        return self.timepicker.isDisabled()
 71
 72    def is_visible(self) -> bool:
 73        """Checks whether the TimePicker control is visible on the page."""
 74        return self.timepicker.isVisible()
 75
 76    def set_properties(self, properties: Dict[str, Any]) -> None:
 77        """Allows changing configuration attributes of the control dynamically."""
 78        self.timepicker.setProperties(js.JSON.parse(json.dumps(properties)))
 79
 80    def set_value(self, value: Union[str, int, float, Dict[str, Any], list]) -> None:
 81        """Sets the value for the TimePicker control."""
 82        self.timepicker.setValue(value)
 83
 84    def show(self) -> None:
 85        """Shows the TimePicker control on the page."""
 86        self.timepicker.show()
 87
 88    def validate(self, silent: bool = False, validate_value: str = None) -> bool:
 89        """Validates the TimePicker control."""
 90        return self.timepicker.validate(silent, validate_value)
 91
 92    """ TimePicker Events """
 93
 94    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 95        """Helper to add event handlers dynamically."""
 96        event_proxy = create_proxy(handler)
 97        self.timepicker.events.on(event_name, event_proxy)
 98
 99    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
100        """Fires after configuration attributes have been changed dynamically."""
101        self.add_event_handler('afterChangeProperties', handler)
102
103    def on_after_hide(self, handler: Callable[[Union[str, Dict[str, Any]], bool], None]) -> None:
104        """Fires after the control is hidden."""
105        self.add_event_handler('afterHide', handler)
106
107    def on_after_show(self, handler: Callable[[Union[str, Dict[str, Any]]], None]) -> None:
108        """Fires after the control is shown."""
109        self.add_event_handler('afterShow', handler)
110
111    def on_after_validate(self, handler: Callable[[Union[str, Dict[str, Any]], bool], None]) -> None:
112        """Fires after the control value is validated."""
113        self.add_event_handler('afterValidate', handler)
114
115    def on_before_change(self, handler: Callable[[Union[str, Dict[str, Any]]], Union[bool, None]]) -> None:
116        """Fires before changing the value of the control."""
117        def event_handler(value):
118            result = handler(value)
119            if result is False:
120                return js.Boolean(False)
121        self.timepicker.events.on('beforeChange', create_proxy(event_handler))
122
123    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
124        """Fires before configuration attributes are changed dynamically."""
125        def event_handler(properties):
126            result = handler(properties.to_py())
127            if result is False:
128                return js.Boolean(False)
129        self.timepicker.events.on('beforeChangeProperties', create_proxy(event_handler))
130
131    def on_before_hide(self, handler: Callable[[Union[str, Dict[str, Any]], bool], Union[bool, None]]) -> None:
132        """Fires before the control is hidden."""
133        def event_handler(value, init):
134            result = handler(value, init)
135            if result is False:
136                return js.Boolean(False)
137        self.timepicker.events.on('beforeHide', create_proxy(event_handler))
138
139    def on_before_show(self, handler: Callable[[Union[str, Dict[str, Any]]], Union[bool, None]]) -> None:
140        """Fires before the control is shown."""
141        def event_handler(value):
142            result = handler(value)
143            if result is False:
144                return js.Boolean(False)
145        self.timepicker.events.on('beforeShow', create_proxy(event_handler))
146
147    def on_before_validate(self, handler: Callable[[Union[str, Dict[str, Any]]], Union[bool, None]]) -> None:
148        """Fires before the control value is validated."""
149        def event_handler(value):
150            result = handler(value)
151            if result is False:
152                return js.Boolean(False)
153        self.timepicker.events.on('beforeValidate', create_proxy(event_handler))
154
155    def on_blur(self, handler: Callable[[Union[str, Dict[str, Any]]], None]) -> None:
156        """Fires when the TimePicker control has lost focus."""
157        self.add_event_handler('blur', handler)
158
159    def on_change(self, handler: Callable[[Union[str, Dict[str, Any]]], None]) -> None:
160        """Fires on changing the value of the control."""
161        self.add_event_handler('change', handler)
162
163    def on_focus(self, handler: Callable[[Union[str, Dict[str, Any]]], None]) -> None:
164        """Fires when the TimePicker control has received focus."""
165        self.add_event_handler('focus', handler)
166
167    def on_input(self, handler: Callable[[str], None]) -> None:
168        """Fires when a user enters the value of a control in the input manually."""
169        self.add_event_handler('input', handler)
170
171    def on_keydown(self, handler: Callable[[Any], None]) -> None:
172        """Fires when any key is pressed and the TimePicker control is in focus."""
173        self.add_event_handler('keydown', handler)
Timepicker( config: TimepickerConfig = None, widget_parent: Any = None)
15    def __init__(self, config: TimepickerConfig = None, widget_parent: Any = None):
16        """Initializes the TimePicker control."""
17        if config is None:
18            config = TimepickerConfig()
19        config_dict = config.to_dict()
20        self.timepicker = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the TimePicker control.

timepicker

TimePicker API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from the TimePicker control."""
26        self.timepicker.blur()

Removes focus from the TimePicker control.

def clear(self) -> None:
28    def clear(self) -> None:
29        """Clears the value of the TimePicker control."""
30        self.timepicker.clear()

Clears the value of the TimePicker control.

def clear_validate(self) -> None:
32    def clear_validate(self) -> None:
33        """Clears validation of the TimePicker control."""
34        self.timepicker.clearValidate()

Clears validation of the TimePicker control.

def destructor(self) -> None:
36    def destructor(self) -> None:
37        """Removes the TimePicker instance and releases the occupied resources."""
38        self.timepicker.destructor()

Removes the TimePicker instance and releases the occupied resources.

def disable(self) -> None:
40    def disable(self) -> None:
41        """Disables the TimePicker control."""
42        self.timepicker.disable()

Disables the TimePicker control.

def enable(self) -> None:
44    def enable(self) -> None:
45        """Enables the TimePicker control."""
46        self.timepicker.enable()

Enables the TimePicker control.

def focus(self) -> None:
48    def focus(self) -> None:
49        """Sets focus to the TimePicker control."""
50        self.timepicker.focus()

Sets focus to the TimePicker control.

def get_properties(self) -> Dict[str, Any]:
52    def get_properties(self) -> Dict[str, Any]:
53        """Returns the configuration attributes of the control."""
54        return self.timepicker.getProperties().to_py()

Returns the configuration attributes of the control.

def get_value(self, as_object: bool = False) -> Union[str, Dict[str, Any]]:
56    def get_value(self, as_object: bool = False) -> Union[str, Dict[str, Any]]:
57        """Returns the current value of the TimePicker control."""
58        return self.timepicker.getValue(as_object)

Returns the current value of the TimePicker control.

def get_widget(self) -> Any:
60    def get_widget(self) -> Any:
61        """Returns the DHTMLX TimePicker widget attached to the TimePicker control."""
62        return self.timepicker.getWidget()

Returns the DHTMLX TimePicker widget attached to the TimePicker control.

def hide(self) -> None:
64    def hide(self) -> None:
65        """Hides the TimePicker control."""
66        self.timepicker.hide()

Hides the TimePicker control.

def is_disabled(self) -> bool:
68    def is_disabled(self) -> bool:
69        """Checks whether the TimePicker control is disabled."""
70        return self.timepicker.isDisabled()

Checks whether the TimePicker control is disabled.

def is_visible(self) -> bool:
72    def is_visible(self) -> bool:
73        """Checks whether the TimePicker control is visible on the page."""
74        return self.timepicker.isVisible()

Checks whether the TimePicker control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
76    def set_properties(self, properties: Dict[str, Any]) -> None:
77        """Allows changing configuration attributes of the control dynamically."""
78        self.timepicker.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def set_value(self, value: Union[str, int, float, Dict[str, Any], list]) -> None:
80    def set_value(self, value: Union[str, int, float, Dict[str, Any], list]) -> None:
81        """Sets the value for the TimePicker control."""
82        self.timepicker.setValue(value)

Sets the value for the TimePicker control.

def show(self) -> None:
84    def show(self) -> None:
85        """Shows the TimePicker control on the page."""
86        self.timepicker.show()

Shows the TimePicker control on the page.

def validate(self, silent: bool = False, validate_value: str = None) -> bool:
88    def validate(self, silent: bool = False, validate_value: str = None) -> bool:
89        """Validates the TimePicker control."""
90        return self.timepicker.validate(silent, validate_value)

Validates the TimePicker control.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
94    def add_event_handler(self, event_name: str, handler: Callable) -> None:
95        """Helper to add event handlers dynamically."""
96        event_proxy = create_proxy(handler)
97        self.timepicker.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
 99    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
100        """Fires after configuration attributes have been changed dynamically."""
101        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide( self, handler: Callable[[Union[str, Dict[str, Any]], bool], NoneType]) -> None:
103    def on_after_hide(self, handler: Callable[[Union[str, Dict[str, Any]], bool], None]) -> None:
104        """Fires after the control is hidden."""
105        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show(self, handler: Callable[[Union[str, Dict[str, Any]]], NoneType]) -> None:
107    def on_after_show(self, handler: Callable[[Union[str, Dict[str, Any]]], None]) -> None:
108        """Fires after the control is shown."""
109        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_after_validate( self, handler: Callable[[Union[str, Dict[str, Any]], bool], NoneType]) -> None:
111    def on_after_validate(self, handler: Callable[[Union[str, Dict[str, Any]], bool], None]) -> None:
112        """Fires after the control value is validated."""
113        self.add_event_handler('afterValidate', handler)

Fires after the control value is validated.

def on_before_change( self, handler: Callable[[Union[str, Dict[str, Any]]], Optional[bool]]) -> None:
115    def on_before_change(self, handler: Callable[[Union[str, Dict[str, Any]]], Union[bool, None]]) -> None:
116        """Fires before changing the value of the control."""
117        def event_handler(value):
118            result = handler(value)
119            if result is False:
120                return js.Boolean(False)
121        self.timepicker.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
123    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
124        """Fires before configuration attributes are changed dynamically."""
125        def event_handler(properties):
126            result = handler(properties.to_py())
127            if result is False:
128                return js.Boolean(False)
129        self.timepicker.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide( self, handler: Callable[[Union[str, Dict[str, Any]], bool], Optional[bool]]) -> None:
131    def on_before_hide(self, handler: Callable[[Union[str, Dict[str, Any]], bool], Union[bool, None]]) -> None:
132        """Fires before the control is hidden."""
133        def event_handler(value, init):
134            result = handler(value, init)
135            if result is False:
136                return js.Boolean(False)
137        self.timepicker.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show( self, handler: Callable[[Union[str, Dict[str, Any]]], Optional[bool]]) -> None:
139    def on_before_show(self, handler: Callable[[Union[str, Dict[str, Any]]], Union[bool, None]]) -> None:
140        """Fires before the control is shown."""
141        def event_handler(value):
142            result = handler(value)
143            if result is False:
144                return js.Boolean(False)
145        self.timepicker.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

def on_before_validate( self, handler: Callable[[Union[str, Dict[str, Any]]], Optional[bool]]) -> None:
147    def on_before_validate(self, handler: Callable[[Union[str, Dict[str, Any]]], Union[bool, None]]) -> None:
148        """Fires before the control value is validated."""
149        def event_handler(value):
150            result = handler(value)
151            if result is False:
152                return js.Boolean(False)
153        self.timepicker.events.on('beforeValidate', create_proxy(event_handler))

Fires before the control value is validated.

def on_blur(self, handler: Callable[[Union[str, Dict[str, Any]]], NoneType]) -> None:
155    def on_blur(self, handler: Callable[[Union[str, Dict[str, Any]]], None]) -> None:
156        """Fires when the TimePicker control has lost focus."""
157        self.add_event_handler('blur', handler)

Fires when the TimePicker control has lost focus.

def on_change(self, handler: Callable[[Union[str, Dict[str, Any]]], NoneType]) -> None:
159    def on_change(self, handler: Callable[[Union[str, Dict[str, Any]]], None]) -> None:
160        """Fires on changing the value of the control."""
161        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_focus(self, handler: Callable[[Union[str, Dict[str, Any]]], NoneType]) -> None:
163    def on_focus(self, handler: Callable[[Union[str, Dict[str, Any]]], None]) -> None:
164        """Fires when the TimePicker control has received focus."""
165        self.add_event_handler('focus', handler)

Fires when the TimePicker control has received focus.

def on_input(self, handler: Callable[[str], NoneType]) -> None:
167    def on_input(self, handler: Callable[[str], None]) -> None:
168        """Fires when a user enters the value of a control in the input manually."""
169        self.add_event_handler('input', handler)

Fires when a user enters the value of a control in the input manually.

def on_keydown(self, handler: Callable[[Any], NoneType]) -> None:
171    def on_keydown(self, handler: Callable[[Any], None]) -> None:
172        """Fires when any key is pressed and the TimePicker control is in focus."""
173        self.add_event_handler('keydown', handler)

Fires when any key is pressed and the TimePicker control is in focus.

class Toggle:
 14class Toggle:
 15    def __init__(self, config: ToggleConfig = None, widget_parent: Any = None):
 16        """Initializes the Toggle control."""
 17        if config is None:
 18            config = ToggleConfig()
 19        config_dict = config.to_dict()
 20        self.toggle = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ Toggle API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from the Toggle control."""
 26        self.toggle.blur()
 27
 28    def destructor(self) -> None:
 29        """Removes the Toggle instance and releases the occupied resources."""
 30        self.toggle.destructor()
 31
 32    def disable(self) -> None:
 33        """Disables the Toggle control."""
 34        self.toggle.disable()
 35
 36    def enable(self) -> None:
 37        """Enables the Toggle control."""
 38        self.toggle.enable()
 39
 40    def focus(self) -> None:
 41        """Sets focus to the Toggle control."""
 42        self.toggle.focus()
 43
 44    def get_properties(self) -> Dict[str, Any]:
 45        """Returns the configuration attributes of the control."""
 46        return self.toggle.getProperties().to_py()
 47
 48    def get_value(self) -> Union[str, int, bool]:
 49        """Returns the current value/state of the Toggle control."""
 50        return self.toggle.getValue()
 51
 52    def hide(self) -> None:
 53        """Hides the Toggle control."""
 54        self.toggle.hide()
 55
 56    def is_disabled(self) -> bool:
 57        """Checks whether the Toggle control is disabled."""
 58        return self.toggle.isDisabled()
 59
 60    def is_selected(self) -> bool:
 61        """Checks whether the selected state is enabled."""
 62        return self.toggle.isSelected()
 63
 64    def is_visible(self) -> bool:
 65        """Checks whether the Toggle control is visible on the page."""
 66        return self.toggle.isVisible()
 67
 68    def set_properties(self, properties: Dict[str, Any]) -> None:
 69        """Allows changing configuration attributes of the control dynamically."""
 70        self.toggle.setProperties(js.JSON.parse(json.dumps(properties)))
 71
 72    def set_value(self, selected: bool) -> None:
 73        """Sets the state for the Toggle control."""
 74        self.toggle.setValue(selected)
 75
 76    def show(self) -> None:
 77        """Shows the Toggle control on the page."""
 78        self.toggle.show()
 79
 80    """ Toggle Events """
 81
 82    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 83        """Helper to add event handlers dynamically."""
 84        event_proxy = create_proxy(handler)
 85        self.toggle.events.on(event_name, event_proxy)
 86
 87    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
 88        """Fires after configuration attributes have been changed dynamically."""
 89        self.add_event_handler('afterChangeProperties', handler)
 90
 91    def on_after_hide(self, handler: Callable[[Union[str, int, bool], bool], None]) -> None:
 92        """Fires after the control is hidden."""
 93        self.add_event_handler('afterHide', handler)
 94
 95    def on_after_show(self, handler: Callable[[Union[str, int, bool]], None]) -> None:
 96        """Fires after the control is shown."""
 97        self.add_event_handler('afterShow', handler)
 98
 99    def on_before_change(self, handler: Callable[[Union[str, int, bool]], Union[bool, None]]) -> None:
100        """Fires before changing the value of the control."""
101        def event_handler(value):
102            result = handler(value)
103            if result is False:
104                return js.Boolean(False)
105        self.toggle.events.on('beforeChange', create_proxy(event_handler))
106
107    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
108        """Fires before configuration attributes are changed dynamically."""
109        def event_handler(properties):
110            result = handler(properties.to_py())
111            if result is False:
112                return js.Boolean(False)
113        self.toggle.events.on('beforeChangeProperties', create_proxy(event_handler))
114
115    def on_before_hide(self, handler: Callable[[Union[str, int, bool], bool], Union[bool, None]]) -> None:
116        """Fires before the control is hidden."""
117        def event_handler(value, init):
118            result = handler(value, init)
119            if result is False:
120                return js.Boolean(False)
121        self.toggle.events.on('beforeHide', create_proxy(event_handler))
122
123    def on_before_show(self, handler: Callable[[Union[str, int, bool]], Union[bool, None]]) -> None:
124        """Fires before the control is shown."""
125        def event_handler(value):
126            result = handler(value)
127            if result is False:
128                return js.Boolean(False)
129        self.toggle.events.on('beforeShow', create_proxy(event_handler))
130
131    def on_blur(self, handler: Callable[[Union[str, int, bool]], None]) -> None:
132        """Fires when the Toggle control has lost focus."""
133        self.add_event_handler('blur', handler)
134
135    def on_change(self, handler: Callable[[Union[str, int, bool]], None]) -> None:
136        """Fires on changing the value of the control."""
137        self.add_event_handler('change', handler)
138
139    def on_focus(self, handler: Callable[[Union[str, int, bool]], None]) -> None:
140        """Fires when the Toggle control has received focus."""
141        self.add_event_handler('focus', handler)
142
143    def on_keydown(self, handler: Callable[[Any], None]) -> None:
144        """Fires when any key is pressed and the Toggle control is in focus."""
145        self.add_event_handler('keydown', handler)
Toggle( config: ToggleConfig = None, widget_parent: Any = None)
15    def __init__(self, config: ToggleConfig = None, widget_parent: Any = None):
16        """Initializes the Toggle control."""
17        if config is None:
18            config = ToggleConfig()
19        config_dict = config.to_dict()
20        self.toggle = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the Toggle control.

toggle

Toggle API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from the Toggle control."""
26        self.toggle.blur()

Removes focus from the Toggle control.

def destructor(self) -> None:
28    def destructor(self) -> None:
29        """Removes the Toggle instance and releases the occupied resources."""
30        self.toggle.destructor()

Removes the Toggle instance and releases the occupied resources.

def disable(self) -> None:
32    def disable(self) -> None:
33        """Disables the Toggle control."""
34        self.toggle.disable()

Disables the Toggle control.

def enable(self) -> None:
36    def enable(self) -> None:
37        """Enables the Toggle control."""
38        self.toggle.enable()

Enables the Toggle control.

def focus(self) -> None:
40    def focus(self) -> None:
41        """Sets focus to the Toggle control."""
42        self.toggle.focus()

Sets focus to the Toggle control.

def get_properties(self) -> Dict[str, Any]:
44    def get_properties(self) -> Dict[str, Any]:
45        """Returns the configuration attributes of the control."""
46        return self.toggle.getProperties().to_py()

Returns the configuration attributes of the control.

def get_value(self) -> Union[str, int, bool]:
48    def get_value(self) -> Union[str, int, bool]:
49        """Returns the current value/state of the Toggle control."""
50        return self.toggle.getValue()

Returns the current value/state of the Toggle control.

def hide(self) -> None:
52    def hide(self) -> None:
53        """Hides the Toggle control."""
54        self.toggle.hide()

Hides the Toggle control.

def is_disabled(self) -> bool:
56    def is_disabled(self) -> bool:
57        """Checks whether the Toggle control is disabled."""
58        return self.toggle.isDisabled()

Checks whether the Toggle control is disabled.

def is_selected(self) -> bool:
60    def is_selected(self) -> bool:
61        """Checks whether the selected state is enabled."""
62        return self.toggle.isSelected()

Checks whether the selected state is enabled.

def is_visible(self) -> bool:
64    def is_visible(self) -> bool:
65        """Checks whether the Toggle control is visible on the page."""
66        return self.toggle.isVisible()

Checks whether the Toggle control is visible on the page.

def set_properties(self, properties: Dict[str, Any]) -> None:
68    def set_properties(self, properties: Dict[str, Any]) -> None:
69        """Allows changing configuration attributes of the control dynamically."""
70        self.toggle.setProperties(js.JSON.parse(json.dumps(properties)))

Allows changing configuration attributes of the control dynamically.

def set_value(self, selected: bool) -> None:
72    def set_value(self, selected: bool) -> None:
73        """Sets the state for the Toggle control."""
74        self.toggle.setValue(selected)

Sets the state for the Toggle control.

def show(self) -> None:
76    def show(self) -> None:
77        """Shows the Toggle control on the page."""
78        self.toggle.show()

Shows the Toggle control on the page.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
82    def add_event_handler(self, event_name: str, handler: Callable) -> None:
83        """Helper to add event handlers dynamically."""
84        event_proxy = create_proxy(handler)
85        self.toggle.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
87    def on_after_change_properties(self, handler: Callable[[Dict[str, Any]], None]) -> None:
88        """Fires after configuration attributes have been changed dynamically."""
89        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[Union[str, int, bool], bool], NoneType]) -> None:
91    def on_after_hide(self, handler: Callable[[Union[str, int, bool], bool], None]) -> None:
92        """Fires after the control is hidden."""
93        self.add_event_handler('afterHide', handler)

Fires after the control is hidden.

def on_after_show(self, handler: Callable[[Union[str, int, bool]], NoneType]) -> None:
95    def on_after_show(self, handler: Callable[[Union[str, int, bool]], None]) -> None:
96        """Fires after the control is shown."""
97        self.add_event_handler('afterShow', handler)

Fires after the control is shown.

def on_before_change(self, handler: Callable[[Union[str, int, bool]], Optional[bool]]) -> None:
 99    def on_before_change(self, handler: Callable[[Union[str, int, bool]], Union[bool, None]]) -> None:
100        """Fires before changing the value of the control."""
101        def event_handler(value):
102            result = handler(value)
103            if result is False:
104                return js.Boolean(False)
105        self.toggle.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
107    def on_before_change_properties(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
108        """Fires before configuration attributes are changed dynamically."""
109        def event_handler(properties):
110            result = handler(properties.to_py())
111            if result is False:
112                return js.Boolean(False)
113        self.toggle.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide( self, handler: Callable[[Union[str, int, bool], bool], Optional[bool]]) -> None:
115    def on_before_hide(self, handler: Callable[[Union[str, int, bool], bool], Union[bool, None]]) -> None:
116        """Fires before the control is hidden."""
117        def event_handler(value, init):
118            result = handler(value, init)
119            if result is False:
120                return js.Boolean(False)
121        self.toggle.events.on('beforeHide', create_proxy(event_handler))

Fires before the control is hidden.

def on_before_show(self, handler: Callable[[Union[str, int, bool]], Optional[bool]]) -> None:
123    def on_before_show(self, handler: Callable[[Union[str, int, bool]], Union[bool, None]]) -> None:
124        """Fires before the control is shown."""
125        def event_handler(value):
126            result = handler(value)
127            if result is False:
128                return js.Boolean(False)
129        self.toggle.events.on('beforeShow', create_proxy(event_handler))

Fires before the control is shown.

def on_blur(self, handler: Callable[[Union[str, int, bool]], NoneType]) -> None:
131    def on_blur(self, handler: Callable[[Union[str, int, bool]], None]) -> None:
132        """Fires when the Toggle control has lost focus."""
133        self.add_event_handler('blur', handler)

Fires when the Toggle control has lost focus.

def on_change(self, handler: Callable[[Union[str, int, bool]], NoneType]) -> None:
135    def on_change(self, handler: Callable[[Union[str, int, bool]], None]) -> None:
136        """Fires on changing the value of the control."""
137        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_focus(self, handler: Callable[[Union[str, int, bool]], NoneType]) -> None:
139    def on_focus(self, handler: Callable[[Union[str, int, bool]], None]) -> None:
140        """Fires when the Toggle control has received focus."""
141        self.add_event_handler('focus', handler)

Fires when the Toggle control has received focus.

def on_keydown(self, handler: Callable[[Any], NoneType]) -> None:
143    def on_keydown(self, handler: Callable[[Any], None]) -> None:
144        """Fires when any key is pressed and the Toggle control is in focus."""
145        self.add_event_handler('keydown', handler)

Fires when any key is pressed and the Toggle control is in focus.

class ToggleGroup:
 14class ToggleGroup:
 15    def __init__(self, config: ToggleGroupConfig = None, widget_parent: Any = None):
 16        """Initializes the ToggleGroup control."""
 17        if config is None:
 18            config = ToggleGroupConfig()
 19        config_dict = config.to_dict()
 20        self.togglegroup = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))
 21
 22    """ ToggleGroup API Functions """
 23
 24    def blur(self) -> None:
 25        """Removes focus from the ToggleGroup control."""
 26        self.togglegroup.blur()
 27
 28    def destructor(self) -> None:
 29        """Removes the ToggleGroup instance and releases the occupied resources."""
 30        self.togglegroup.destructor()
 31
 32    def disable(self, id: str = None) -> None:
 33        """Disables the ToggleGroup control or a specific element."""
 34        self.togglegroup.disable(id)
 35
 36    def enable(self, id: str = None) -> None:
 37        """Enables the ToggleGroup control or a specific element."""
 38        self.togglegroup.enable(id)
 39
 40    def focus(self, id: str = None) -> None:
 41        """Sets focus to an option of the ToggleGroup control by its id."""
 42        self.togglegroup.focus(id)
 43
 44    def get_properties(self, id: str = None) -> Dict[str, Any]:
 45        """Returns the configuration attributes of the control or its toggle."""
 46        props = self.togglegroup.getProperties(id)
 47        return props.to_py() if props else {}
 48
 49    def get_value(self, id: str = None) -> Union[str, int, bool, Dict[str, Union[str, int, bool]]]:
 50        """Returns the current value/state of a toggle(s)."""
 51        return self.togglegroup.getValue(id).to_py()
 52
 53    def hide(self, id: str = None) -> None:
 54        """Hides either an option of ToggleGroup or the whole ToggleGroup."""
 55        self.togglegroup.hide(id)
 56
 57    def is_disabled(self, id: str = None) -> bool:
 58        """Checks whether the ToggleGroup control or a specific element is disabled."""
 59        return self.togglegroup.isDisabled(id)
 60
 61    def is_selected(self, id: str = None) -> Union[bool, Dict[str, bool]]:
 62        """Checks whether a toggle of the ToggleGroup control is selected."""
 63        result = self.togglegroup.isSelected(id)
 64        return result.to_py() if isinstance(result, js.Object) else result
 65
 66    def is_visible(self, id: str = None) -> bool:
 67        """Checks whether the ToggleGroup control or a specific element is visible."""
 68        return self.togglegroup.isVisible(id)
 69
 70    def set_properties(self, config: Dict[str, Any], id: str = None) -> None:
 71        """Allows changing configuration attributes dynamically."""
 72        self.togglegroup.setProperties(js.JSON.parse(json.dumps(config)), id)
 73
 74    def set_value(self, value: Dict[str, bool]) -> None:
 75        """Defines the state of the option's elements."""
 76        self.togglegroup.setValue(js.JSON.parse(json.dumps(value)))
 77
 78    def show(self, id: str = None) -> None:
 79        """Shows either an option of ToggleGroup or the whole ToggleGroup."""
 80        self.togglegroup.show(id)
 81
 82    """ ToggleGroup Events """
 83
 84    def add_event_handler(self, event_name: str, handler: Callable) -> None:
 85        """Helper to add event handlers dynamically."""
 86        event_proxy = create_proxy(handler)
 87        self.togglegroup.events.on(event_name, event_proxy)
 88
 89    def on_after_change_properties(self, handler: Callable[[Dict[str, Any], str], None]) -> None:
 90        """Fires after configuration attributes have been changed dynamically."""
 91        self.add_event_handler('afterChangeProperties', handler)
 92
 93    def on_after_hide(self, handler: Callable[[Dict[str, Any], str, bool], None]) -> None:
 94        """Fires after the control or its toggle is hidden."""
 95        self.add_event_handler('afterHide', handler)
 96
 97    def on_after_show(self, handler: Callable[[Dict[str, Any], str], None]) -> None:
 98        """Fires after the control or its toggle is shown."""
 99        self.add_event_handler('afterShow', handler)
100
101    def on_before_change(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
102        """Fires before changing the value of the control."""
103        def event_handler(value):
104            result = handler(value.to_py())
105            if result is False:
106                return js.Boolean(False)
107        self.togglegroup.events.on('beforeChange', create_proxy(event_handler))
108
109    def on_before_change_properties(self, handler: Callable[[Dict[str, Any], str], Union[bool, None]]) -> None:
110        """Fires before configuration attributes are changed dynamically."""
111        def event_handler(properties, id=None):
112            result = handler(properties.to_py(), id)
113            if result is False:
114                return js.Boolean(False)
115        self.togglegroup.events.on('beforeChangeProperties', create_proxy(event_handler))
116
117    def on_before_hide(self, handler: Callable[[Dict[str, Any], str, bool], Union[bool, None]]) -> None:
118        """Fires before the control or its toggle is hidden."""
119        def event_handler(value, id=None, init=False):
120            result = handler(value.to_py(), id, init)
121            if result is False:
122                return js.Boolean(False)
123        self.togglegroup.events.on('beforeHide', create_proxy(event_handler))
124
125    def on_before_show(self, handler: Callable[[Dict[str, Any], str], Union[bool, None]]) -> None:
126        """Fires before the control or its toggle is shown."""
127        def event_handler(value, id=None):
128            result = handler(value.to_py(), id)
129            if result is False:
130                return js.Boolean(False)
131        self.togglegroup.events.on('beforeShow', create_proxy(event_handler))
132
133    def on_blur(self, handler: Callable[[Dict[str, Any], str], None]) -> None:
134        """Fires when the ToggleGroup control has lost focus."""
135        self.add_event_handler('blur', handler)
136
137    def on_change(self, handler: Callable[[Dict[str, Any]], None]) -> None:
138        """Fires on changing the value of the control."""
139        self.add_event_handler('change', handler)
140
141    def on_focus(self, handler: Callable[[Dict[str, Any], str], None]) -> None:
142        """Fires when the ToggleGroup control has received focus."""
143        self.add_event_handler('focus', handler)
144
145    def on_keydown(self, handler: Callable[[Any, str], None]) -> None:
146        """Fires when any key is pressed and a toggle is in focus."""
147        self.add_event_handler('keydown', handler)
ToggleGroup( config: ToggleGroupConfig = None, widget_parent: Any = None)
15    def __init__(self, config: ToggleGroupConfig = None, widget_parent: Any = None):
16        """Initializes the ToggleGroup control."""
17        if config is None:
18            config = ToggleGroupConfig()
19        config_dict = config.to_dict()
20        self.togglegroup = js.dhx.FormControl.new(widget_parent, js.JSON.parse(json.dumps(config_dict)))

Initializes the ToggleGroup control.

togglegroup

ToggleGroup API Functions

def blur(self) -> None:
24    def blur(self) -> None:
25        """Removes focus from the ToggleGroup control."""
26        self.togglegroup.blur()

Removes focus from the ToggleGroup control.

def destructor(self) -> None:
28    def destructor(self) -> None:
29        """Removes the ToggleGroup instance and releases the occupied resources."""
30        self.togglegroup.destructor()

Removes the ToggleGroup instance and releases the occupied resources.

def disable(self, id: str = None) -> None:
32    def disable(self, id: str = None) -> None:
33        """Disables the ToggleGroup control or a specific element."""
34        self.togglegroup.disable(id)

Disables the ToggleGroup control or a specific element.

def enable(self, id: str = None) -> None:
36    def enable(self, id: str = None) -> None:
37        """Enables the ToggleGroup control or a specific element."""
38        self.togglegroup.enable(id)

Enables the ToggleGroup control or a specific element.

def focus(self, id: str = None) -> None:
40    def focus(self, id: str = None) -> None:
41        """Sets focus to an option of the ToggleGroup control by its id."""
42        self.togglegroup.focus(id)

Sets focus to an option of the ToggleGroup control by its id.

def get_properties(self, id: str = None) -> Dict[str, Any]:
44    def get_properties(self, id: str = None) -> Dict[str, Any]:
45        """Returns the configuration attributes of the control or its toggle."""
46        props = self.togglegroup.getProperties(id)
47        return props.to_py() if props else {}

Returns the configuration attributes of the control or its toggle.

def get_value( self, id: str = None) -> Union[str, int, bool, Dict[str, Union[str, int, bool]]]:
49    def get_value(self, id: str = None) -> Union[str, int, bool, Dict[str, Union[str, int, bool]]]:
50        """Returns the current value/state of a toggle(s)."""
51        return self.togglegroup.getValue(id).to_py()

Returns the current value/state of a toggle(s).

def hide(self, id: str = None) -> None:
53    def hide(self, id: str = None) -> None:
54        """Hides either an option of ToggleGroup or the whole ToggleGroup."""
55        self.togglegroup.hide(id)

Hides either an option of ToggleGroup or the whole ToggleGroup.

def is_disabled(self, id: str = None) -> bool:
57    def is_disabled(self, id: str = None) -> bool:
58        """Checks whether the ToggleGroup control or a specific element is disabled."""
59        return self.togglegroup.isDisabled(id)

Checks whether the ToggleGroup control or a specific element is disabled.

def is_selected(self, id: str = None) -> Union[bool, Dict[str, bool]]:
61    def is_selected(self, id: str = None) -> Union[bool, Dict[str, bool]]:
62        """Checks whether a toggle of the ToggleGroup control is selected."""
63        result = self.togglegroup.isSelected(id)
64        return result.to_py() if isinstance(result, js.Object) else result

Checks whether a toggle of the ToggleGroup control is selected.

def is_visible(self, id: str = None) -> bool:
66    def is_visible(self, id: str = None) -> bool:
67        """Checks whether the ToggleGroup control or a specific element is visible."""
68        return self.togglegroup.isVisible(id)

Checks whether the ToggleGroup control or a specific element is visible.

def set_properties(self, config: Dict[str, Any], id: str = None) -> None:
70    def set_properties(self, config: Dict[str, Any], id: str = None) -> None:
71        """Allows changing configuration attributes dynamically."""
72        self.togglegroup.setProperties(js.JSON.parse(json.dumps(config)), id)

Allows changing configuration attributes dynamically.

def set_value(self, value: Dict[str, bool]) -> None:
74    def set_value(self, value: Dict[str, bool]) -> None:
75        """Defines the state of the option's elements."""
76        self.togglegroup.setValue(js.JSON.parse(json.dumps(value)))

Defines the state of the option's elements.

def show(self, id: str = None) -> None:
78    def show(self, id: str = None) -> None:
79        """Shows either an option of ToggleGroup or the whole ToggleGroup."""
80        self.togglegroup.show(id)

Shows either an option of ToggleGroup or the whole ToggleGroup.

def add_event_handler(self, event_name: str, handler: Callable) -> None:
84    def add_event_handler(self, event_name: str, handler: Callable) -> None:
85        """Helper to add event handlers dynamically."""
86        event_proxy = create_proxy(handler)
87        self.togglegroup.events.on(event_name, event_proxy)

Helper to add event handlers dynamically.

def on_after_change_properties(self, handler: Callable[[Dict[str, Any], str], NoneType]) -> None:
89    def on_after_change_properties(self, handler: Callable[[Dict[str, Any], str], None]) -> None:
90        """Fires after configuration attributes have been changed dynamically."""
91        self.add_event_handler('afterChangeProperties', handler)

Fires after configuration attributes have been changed dynamically.

def on_after_hide(self, handler: Callable[[Dict[str, Any], str, bool], NoneType]) -> None:
93    def on_after_hide(self, handler: Callable[[Dict[str, Any], str, bool], None]) -> None:
94        """Fires after the control or its toggle is hidden."""
95        self.add_event_handler('afterHide', handler)

Fires after the control or its toggle is hidden.

def on_after_show(self, handler: Callable[[Dict[str, Any], str], NoneType]) -> None:
97    def on_after_show(self, handler: Callable[[Dict[str, Any], str], None]) -> None:
98        """Fires after the control or its toggle is shown."""
99        self.add_event_handler('afterShow', handler)

Fires after the control or its toggle is shown.

def on_before_change(self, handler: Callable[[Dict[str, Any]], Optional[bool]]) -> None:
101    def on_before_change(self, handler: Callable[[Dict[str, Any]], Union[bool, None]]) -> None:
102        """Fires before changing the value of the control."""
103        def event_handler(value):
104            result = handler(value.to_py())
105            if result is False:
106                return js.Boolean(False)
107        self.togglegroup.events.on('beforeChange', create_proxy(event_handler))

Fires before changing the value of the control.

def on_before_change_properties(self, handler: Callable[[Dict[str, Any], str], Optional[bool]]) -> None:
109    def on_before_change_properties(self, handler: Callable[[Dict[str, Any], str], Union[bool, None]]) -> None:
110        """Fires before configuration attributes are changed dynamically."""
111        def event_handler(properties, id=None):
112            result = handler(properties.to_py(), id)
113            if result is False:
114                return js.Boolean(False)
115        self.togglegroup.events.on('beforeChangeProperties', create_proxy(event_handler))

Fires before configuration attributes are changed dynamically.

def on_before_hide( self, handler: Callable[[Dict[str, Any], str, bool], Optional[bool]]) -> None:
117    def on_before_hide(self, handler: Callable[[Dict[str, Any], str, bool], Union[bool, None]]) -> None:
118        """Fires before the control or its toggle is hidden."""
119        def event_handler(value, id=None, init=False):
120            result = handler(value.to_py(), id, init)
121            if result is False:
122                return js.Boolean(False)
123        self.togglegroup.events.on('beforeHide', create_proxy(event_handler))

Fires before the control or its toggle is hidden.

def on_before_show(self, handler: Callable[[Dict[str, Any], str], Optional[bool]]) -> None:
125    def on_before_show(self, handler: Callable[[Dict[str, Any], str], Union[bool, None]]) -> None:
126        """Fires before the control or its toggle is shown."""
127        def event_handler(value, id=None):
128            result = handler(value.to_py(), id)
129            if result is False:
130                return js.Boolean(False)
131        self.togglegroup.events.on('beforeShow', create_proxy(event_handler))

Fires before the control or its toggle is shown.

def on_blur(self, handler: Callable[[Dict[str, Any], str], NoneType]) -> None:
133    def on_blur(self, handler: Callable[[Dict[str, Any], str], None]) -> None:
134        """Fires when the ToggleGroup control has lost focus."""
135        self.add_event_handler('blur', handler)

Fires when the ToggleGroup control has lost focus.

def on_change(self, handler: Callable[[Dict[str, Any]], NoneType]) -> None:
137    def on_change(self, handler: Callable[[Dict[str, Any]], None]) -> None:
138        """Fires on changing the value of the control."""
139        self.add_event_handler('change', handler)

Fires on changing the value of the control.

def on_focus(self, handler: Callable[[Dict[str, Any], str], NoneType]) -> None:
141    def on_focus(self, handler: Callable[[Dict[str, Any], str], None]) -> None:
142        """Fires when the ToggleGroup control has received focus."""
143        self.add_event_handler('focus', handler)

Fires when the ToggleGroup control has received focus.

def on_keydown(self, handler: Callable[[Any, str], NoneType]) -> None:
145    def on_keydown(self, handler: Callable[[Any, str], None]) -> None:
146        """Fires when any key is pressed and a toggle is in focus."""
147        self.add_event_handler('keydown', handler)

Fires when any key is pressed and a toggle is in focus.

class AvatarConfig:
  6class AvatarConfig:
  7    """
  8    Configuration class for the Avatar control.
  9    """
 10    def __init__(self,
 11                 name: str = None,
 12                 id: str = None,
 13                 target: str = None,
 14                 value: Dict[str, Any] = None,
 15                 hidden: bool = False,
 16                 disabled: bool = False,
 17                 readOnly: bool = False,
 18                 removeIcon: bool = True,
 19                 circle: bool = False,
 20                 icon: str = None,
 21                 placeholder: str = None,
 22                 preview: str = None,
 23                 alt: str = None,
 24                 size: Union[str, int] = "medium",
 25                 css: str = None,
 26                 width: Union[str, int] = "content",
 27                 height: Union[str, int] = "content",
 28                 padding: Union[str, int] = "5px",
 29                 label: str = None,
 30                 labelWidth: Union[str, int] = None,
 31                 labelPosition: str = "top",
 32                 hiddenLabel: bool = False,
 33                 helpMessage: str = None,
 34                 required: bool = False,
 35                 preMessage: str = None,
 36                 successMessage: str = None,
 37                 errorMessage: str = None,
 38                 validation: Callable[[Any], bool] = None,
 39                 accept: str = "image/*",
 40                 fieldName: str = "file",
 41                 autosend: bool = False,
 42                 params: Dict[str, Any] = None,
 43                 headerParams: Dict[str, Any] = None,
 44                 updateFromResponse: bool = True):
 45        """
 46        :param name: (Optional) The name of the control.
 47        :param id: (Optional) The id of the control.
 48        :param target: (Optional) The URL to the server-side script for file upload.
 49        :param value: (Optional) The initial value of the Avatar control.
 50        :param hidden: (Optional) Whether the control is hidden.
 51        :param disabled: (Optional) Whether the control is disabled.
 52        :param readOnly: (Optional) Sets the readonly mode for the control.
 53        :param removeIcon: (Optional) Enables the possibility to clear the control via UI.
 54        :param circle: (Optional) Sets the mode of displaying the control with rounded corners.
 55        :param icon: (Optional) The CSS class of an icon when there is no image uploaded.
 56        :param placeholder: (Optional) The text visible when there is no image uploaded.
 57        :param preview: (Optional) Specifies the absolute path to the preview image.
 58        :param alt: (Optional) Sets the 'alt' attribute of the <img> tag.
 59        :param size: (Optional) The size of the control.
 60        :param css: (Optional) Adds style classes to the control.
 61        :param width: (Optional) The width of the control.
 62        :param height: (Optional) The height of the control.
 63        :param padding: (Optional) Sets padding between the cell and border.
 64        :param label: (Optional) Specifies a label for the control.
 65        :param labelWidth: (Optional) Sets the label width of the control.
 66        :param labelPosition: (Optional) Defines the position of the label.
 67        :param hiddenLabel: (Optional) Makes the label invisible.
 68        :param helpMessage: (Optional) Adds a help message to the control.
 69        :param required: (Optional) Defines whether the control is required.
 70        :param preMessage: (Optional) Instructions for interacting with the control.
 71        :param successMessage: (Optional) Message shown after successful validation.
 72        :param errorMessage: (Optional) Message shown after validation error.
 73        :param validation: (Optional) The validation function.
 74        :param accept: (Optional) Specifies the type/extension of the selected file.
 75        :param fieldName: (Optional) Sets the file field name in the form data.
 76        :param autosend: (Optional) Enables/disables automatic sending of an added file.
 77        :param params: (Optional) Extra parameters for sending an XMLHttpRequest.
 78        :param headerParams: (Optional) Additional parameters for Request Headers.
 79        :param updateFromResponse: (Optional) Updates file attributes with server response data.
 80        """
 81        self.type = "avatar"
 82        self.name = name
 83        self.id = id
 84        self.target = target
 85        self.value = value
 86        self.hidden = hidden
 87        self.disabled = disabled
 88        self.readOnly = readOnly
 89        self.removeIcon = removeIcon
 90        self.circle = circle
 91        self.icon = icon
 92        self.placeholder = placeholder
 93        self.preview = preview
 94        self.alt = alt
 95        self.size = size
 96        self.css = css
 97        self.width = width
 98        self.height = height
 99        self.padding = padding
100        self.label = label
101        self.labelWidth = labelWidth
102        self.labelPosition = labelPosition
103        self.hiddenLabel = hiddenLabel
104        self.helpMessage = helpMessage
105        self.required = required
106        self.preMessage = preMessage
107        self.successMessage = successMessage
108        self.errorMessage = errorMessage
109        self.validation = validation
110        self.accept = accept
111        self.fieldName = fieldName
112        self.autosend = autosend
113        self.params = params
114        self.headerParams = headerParams
115        self.updateFromResponse = updateFromResponse
116
117    def to_dict(self) -> Dict[str, Any]:
118        """
119        Converts the AvatarConfig into a dictionary format.
120        """
121        config_dict = {
122            'type': self.type,
123            'name': self.name,
124            'id': self.id,
125            'target': self.target,
126            'value': self.value,
127            'hidden': self.hidden,
128            'disabled': self.disabled,
129            'readOnly': self.readOnly,
130            'removeIcon': self.removeIcon,
131            'circle': self.circle,
132            'icon': self.icon,
133            'placeholder': self.placeholder,
134            'preview': self.preview,
135            'alt': self.alt,
136            'size': self.size,
137            'css': self.css,
138            'width': self.width,
139            'height': self.height,
140            'padding': self.padding,
141            'label': self.label,
142            'labelWidth': self.labelWidth,
143            'labelPosition': self.labelPosition,
144            'hiddenLabel': self.hiddenLabel,
145            'helpMessage': self.helpMessage,
146            'required': self.required,
147            'preMessage': self.preMessage,
148            'successMessage': self.successMessage,
149            'errorMessage': self.errorMessage,
150            'validation': self.validation,
151            'accept': self.accept,
152            'fieldName': self.fieldName,
153            'autosend': self.autosend,
154            'params': self.params,
155            'headerParams': self.headerParams,
156            'updateFromResponse': self.updateFromResponse
157        }
158        # Remove None values
159        config_dict = {k: v for k, v in config_dict.items() if v is not None}
160
161        # Handle functions
162        if 'validation' in config_dict:
163            config_dict['validation'] = create_proxy(self.validation)
164
165        return config_dict

Configuration class for the Avatar control.

AvatarConfig( name: str = None, id: str = None, target: str = None, value: Dict[str, Any] = None, hidden: bool = False, disabled: bool = False, readOnly: bool = False, removeIcon: bool = True, circle: bool = False, icon: str = None, placeholder: str = None, preview: str = None, alt: str = None, size: Union[str, int] = 'medium', css: str = None, width: Union[str, int] = 'content', height: Union[str, int] = 'content', padding: Union[str, int] = '5px', label: str = None, labelWidth: Union[str, int] = None, labelPosition: str = 'top', hiddenLabel: bool = False, helpMessage: str = None, required: bool = False, preMessage: str = None, successMessage: str = None, errorMessage: str = None, validation: Callable[[Any], bool] = None, accept: str = 'image/*', fieldName: str = 'file', autosend: bool = False, params: Dict[str, Any] = None, headerParams: Dict[str, Any] = None, updateFromResponse: bool = True)
 10    def __init__(self,
 11                 name: str = None,
 12                 id: str = None,
 13                 target: str = None,
 14                 value: Dict[str, Any] = None,
 15                 hidden: bool = False,
 16                 disabled: bool = False,
 17                 readOnly: bool = False,
 18                 removeIcon: bool = True,
 19                 circle: bool = False,
 20                 icon: str = None,
 21                 placeholder: str = None,
 22                 preview: str = None,
 23                 alt: str = None,
 24                 size: Union[str, int] = "medium",
 25                 css: str = None,
 26                 width: Union[str, int] = "content",
 27                 height: Union[str, int] = "content",
 28                 padding: Union[str, int] = "5px",
 29                 label: str = None,
 30                 labelWidth: Union[str, int] = None,
 31                 labelPosition: str = "top",
 32                 hiddenLabel: bool = False,
 33                 helpMessage: str = None,
 34                 required: bool = False,
 35                 preMessage: str = None,
 36                 successMessage: str = None,
 37                 errorMessage: str = None,
 38                 validation: Callable[[Any], bool] = None,
 39                 accept: str = "image/*",
 40                 fieldName: str = "file",
 41                 autosend: bool = False,
 42                 params: Dict[str, Any] = None,
 43                 headerParams: Dict[str, Any] = None,
 44                 updateFromResponse: bool = True):
 45        """
 46        :param name: (Optional) The name of the control.
 47        :param id: (Optional) The id of the control.
 48        :param target: (Optional) The URL to the server-side script for file upload.
 49        :param value: (Optional) The initial value of the Avatar control.
 50        :param hidden: (Optional) Whether the control is hidden.
 51        :param disabled: (Optional) Whether the control is disabled.
 52        :param readOnly: (Optional) Sets the readonly mode for the control.
 53        :param removeIcon: (Optional) Enables the possibility to clear the control via UI.
 54        :param circle: (Optional) Sets the mode of displaying the control with rounded corners.
 55        :param icon: (Optional) The CSS class of an icon when there is no image uploaded.
 56        :param placeholder: (Optional) The text visible when there is no image uploaded.
 57        :param preview: (Optional) Specifies the absolute path to the preview image.
 58        :param alt: (Optional) Sets the 'alt' attribute of the <img> tag.
 59        :param size: (Optional) The size of the control.
 60        :param css: (Optional) Adds style classes to the control.
 61        :param width: (Optional) The width of the control.
 62        :param height: (Optional) The height of the control.
 63        :param padding: (Optional) Sets padding between the cell and border.
 64        :param label: (Optional) Specifies a label for the control.
 65        :param labelWidth: (Optional) Sets the label width of the control.
 66        :param labelPosition: (Optional) Defines the position of the label.
 67        :param hiddenLabel: (Optional) Makes the label invisible.
 68        :param helpMessage: (Optional) Adds a help message to the control.
 69        :param required: (Optional) Defines whether the control is required.
 70        :param preMessage: (Optional) Instructions for interacting with the control.
 71        :param successMessage: (Optional) Message shown after successful validation.
 72        :param errorMessage: (Optional) Message shown after validation error.
 73        :param validation: (Optional) The validation function.
 74        :param accept: (Optional) Specifies the type/extension of the selected file.
 75        :param fieldName: (Optional) Sets the file field name in the form data.
 76        :param autosend: (Optional) Enables/disables automatic sending of an added file.
 77        :param params: (Optional) Extra parameters for sending an XMLHttpRequest.
 78        :param headerParams: (Optional) Additional parameters for Request Headers.
 79        :param updateFromResponse: (Optional) Updates file attributes with server response data.
 80        """
 81        self.type = "avatar"
 82        self.name = name
 83        self.id = id
 84        self.target = target
 85        self.value = value
 86        self.hidden = hidden
 87        self.disabled = disabled
 88        self.readOnly = readOnly
 89        self.removeIcon = removeIcon
 90        self.circle = circle
 91        self.icon = icon
 92        self.placeholder = placeholder
 93        self.preview = preview
 94        self.alt = alt
 95        self.size = size
 96        self.css = css
 97        self.width = width
 98        self.height = height
 99        self.padding = padding
100        self.label = label
101        self.labelWidth = labelWidth
102        self.labelPosition = labelPosition
103        self.hiddenLabel = hiddenLabel
104        self.helpMessage = helpMessage
105        self.required = required
106        self.preMessage = preMessage
107        self.successMessage = successMessage
108        self.errorMessage = errorMessage
109        self.validation = validation
110        self.accept = accept
111        self.fieldName = fieldName
112        self.autosend = autosend
113        self.params = params
114        self.headerParams = headerParams
115        self.updateFromResponse = updateFromResponse
Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • target: (Optional) The URL to the server-side script for file upload.
  • value: (Optional) The initial value of the Avatar control.
  • hidden: (Optional) Whether the control is hidden.
  • disabled: (Optional) Whether the control is disabled.
  • readOnly: (Optional) Sets the readonly mode for the control.
  • removeIcon: (Optional) Enables the possibility to clear the control via UI.
  • circle: (Optional) Sets the mode of displaying the control with rounded corners.
  • icon: (Optional) The CSS class of an icon when there is no image uploaded.
  • placeholder: (Optional) The text visible when there is no image uploaded.
  • preview: (Optional) Specifies the absolute path to the preview image.
  • alt: (Optional) Sets the 'alt' attribute of the tag.
  • size: (Optional) The size of the control.
  • css: (Optional) Adds style classes to the control.
  • width: (Optional) The width of the control.
  • height: (Optional) The height of the control.
  • padding: (Optional) Sets padding between the cell and border.
  • label: (Optional) Specifies a label for the control.
  • labelWidth: (Optional) Sets the label width of the control.
  • labelPosition: (Optional) Defines the position of the label.
  • hiddenLabel: (Optional) Makes the label invisible.
  • helpMessage: (Optional) Adds a help message to the control.
  • required: (Optional) Defines whether the control is required.
  • preMessage: (Optional) Instructions for interacting with the control.
  • successMessage: (Optional) Message shown after successful validation.
  • errorMessage: (Optional) Message shown after validation error.
  • validation: (Optional) The validation function.
  • accept: (Optional) Specifies the type/extension of the selected file.
  • fieldName: (Optional) Sets the file field name in the form data.
  • autosend: (Optional) Enables/disables automatic sending of an added file.
  • params: (Optional) Extra parameters for sending an XMLHttpRequest.
  • headerParams: (Optional) Additional parameters for Request Headers.
  • updateFromResponse: (Optional) Updates file attributes with server response data.
type
name
id
target
value
hidden
disabled
readOnly
removeIcon
circle
icon
placeholder
preview
alt
size
css
width
height
padding
label
labelWidth
labelPosition
hiddenLabel
helpMessage
required
preMessage
successMessage
errorMessage
validation
accept
fieldName
autosend
params
headerParams
updateFromResponse
def to_dict(self) -> Dict[str, Any]:
117    def to_dict(self) -> Dict[str, Any]:
118        """
119        Converts the AvatarConfig into a dictionary format.
120        """
121        config_dict = {
122            'type': self.type,
123            'name': self.name,
124            'id': self.id,
125            'target': self.target,
126            'value': self.value,
127            'hidden': self.hidden,
128            'disabled': self.disabled,
129            'readOnly': self.readOnly,
130            'removeIcon': self.removeIcon,
131            'circle': self.circle,
132            'icon': self.icon,
133            'placeholder': self.placeholder,
134            'preview': self.preview,
135            'alt': self.alt,
136            'size': self.size,
137            'css': self.css,
138            'width': self.width,
139            'height': self.height,
140            'padding': self.padding,
141            'label': self.label,
142            'labelWidth': self.labelWidth,
143            'labelPosition': self.labelPosition,
144            'hiddenLabel': self.hiddenLabel,
145            'helpMessage': self.helpMessage,
146            'required': self.required,
147            'preMessage': self.preMessage,
148            'successMessage': self.successMessage,
149            'errorMessage': self.errorMessage,
150            'validation': self.validation,
151            'accept': self.accept,
152            'fieldName': self.fieldName,
153            'autosend': self.autosend,
154            'params': self.params,
155            'headerParams': self.headerParams,
156            'updateFromResponse': self.updateFromResponse
157        }
158        # Remove None values
159        config_dict = {k: v for k, v in config_dict.items() if v is not None}
160
161        # Handle functions
162        if 'validation' in config_dict:
163            config_dict['validation'] = create_proxy(self.validation)
164
165        return config_dict

Converts the AvatarConfig into a dictionary format.

class ButtonConfig:
 6class ButtonConfig:
 7    """
 8    Configuration class for the Button control.
 9    """
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 text: str = None,
14                 submit: bool = False,
15                 url: str = None,
16                 css: str = None,
17                 disabled: bool = False,
18                 height: Union[str, int] = "content",
19                 hidden: bool = False,
20                 padding: Union[str, int] = "5px",
21                 width: Union[str, int] = "content",
22                 circle: bool = False,
23                 color: str = "primary",
24                 full: bool = False,
25                 icon: str = None,
26                 loading: bool = False,
27                 size: str = "medium",
28                 view: str = "flat"):
29        """
30        :param name: (Optional) The name of the control.
31        :param id: (Optional) The id of the control.
32        :param text: (Optional) The text label of the button.
33        :param submit: (Optional) Enables the button to send form data to a server.
34        :param url: (Optional) The URL the post request with form data will be sent to.
35        :param css: (Optional) Adds style classes to the control.
36        :param disabled: (Optional) Whether the control is disabled.
37        :param height: (Optional) The height of the control.
38        :param hidden: (Optional) Whether the control is hidden.
39        :param padding: (Optional) Sets padding between the cell and border.
40        :param width: (Optional) The width of the control.
41        :param circle: (Optional) Makes the corners of the button round.
42        :param color: (Optional) Defines the color scheme of the button.
43        :param full: (Optional) Extends the button to the full width of the form.
44        :param icon: (Optional) The CSS class of an icon of the button.
45        :param loading: (Optional) Adds a spinner into the button.
46        :param size: (Optional) Defines the size of the button.
47        :param view: (Optional) Defines the look of the button.
48        """
49        self.type = "button"
50        self.name = name
51        self.id = id
52        self.text = text
53        self.submit = submit
54        self.url = url
55        self.css = css
56        self.disabled = disabled
57        self.height = height
58        self.hidden = hidden
59        self.padding = padding
60        self.width = width
61        self.circle = circle
62        self.color = color
63        self.full = full
64        self.icon = icon
65        self.loading = loading
66        self.size = size
67        self.view = view
68
69    def to_dict(self) -> Dict[str, Any]:
70        """
71        Converts the ButtonConfig into a dictionary format.
72        """
73        config_dict = {
74            'type': self.type,
75            'name': self.name,
76            'id': self.id,
77            'text': self.text,
78            'submit': self.submit,
79            'url': self.url,
80            'css': self.css,
81            'disabled': self.disabled,
82            'height': self.height,
83            'hidden': self.hidden,
84            'padding': self.padding,
85            'width': self.width,
86            'circle': self.circle,
87            'color': self.color,
88            'full': self.full,
89            'icon': self.icon,
90            'loading': self.loading,
91            'size': self.size,
92            'view': self.view
93        }
94        # Remove None values
95        return {k: v for k, v in config_dict.items() if v is not None}

Configuration class for the Button control.

ButtonConfig( name: str = None, id: str = None, text: str = None, submit: bool = False, url: str = None, css: str = None, disabled: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', width: Union[str, int] = 'content', circle: bool = False, color: str = 'primary', full: bool = False, icon: str = None, loading: bool = False, size: str = 'medium', view: str = 'flat')
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 text: str = None,
14                 submit: bool = False,
15                 url: str = None,
16                 css: str = None,
17                 disabled: bool = False,
18                 height: Union[str, int] = "content",
19                 hidden: bool = False,
20                 padding: Union[str, int] = "5px",
21                 width: Union[str, int] = "content",
22                 circle: bool = False,
23                 color: str = "primary",
24                 full: bool = False,
25                 icon: str = None,
26                 loading: bool = False,
27                 size: str = "medium",
28                 view: str = "flat"):
29        """
30        :param name: (Optional) The name of the control.
31        :param id: (Optional) The id of the control.
32        :param text: (Optional) The text label of the button.
33        :param submit: (Optional) Enables the button to send form data to a server.
34        :param url: (Optional) The URL the post request with form data will be sent to.
35        :param css: (Optional) Adds style classes to the control.
36        :param disabled: (Optional) Whether the control is disabled.
37        :param height: (Optional) The height of the control.
38        :param hidden: (Optional) Whether the control is hidden.
39        :param padding: (Optional) Sets padding between the cell and border.
40        :param width: (Optional) The width of the control.
41        :param circle: (Optional) Makes the corners of the button round.
42        :param color: (Optional) Defines the color scheme of the button.
43        :param full: (Optional) Extends the button to the full width of the form.
44        :param icon: (Optional) The CSS class of an icon of the button.
45        :param loading: (Optional) Adds a spinner into the button.
46        :param size: (Optional) Defines the size of the button.
47        :param view: (Optional) Defines the look of the button.
48        """
49        self.type = "button"
50        self.name = name
51        self.id = id
52        self.text = text
53        self.submit = submit
54        self.url = url
55        self.css = css
56        self.disabled = disabled
57        self.height = height
58        self.hidden = hidden
59        self.padding = padding
60        self.width = width
61        self.circle = circle
62        self.color = color
63        self.full = full
64        self.icon = icon
65        self.loading = loading
66        self.size = size
67        self.view = view
Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • text: (Optional) The text label of the button.
  • submit: (Optional) Enables the button to send form data to a server.
  • url: (Optional) The URL the post request with form data will be sent to.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • width: (Optional) The width of the control.
  • circle: (Optional) Makes the corners of the button round.
  • color: (Optional) Defines the color scheme of the button.
  • full: (Optional) Extends the button to the full width of the form.
  • icon: (Optional) The CSS class of an icon of the button.
  • loading: (Optional) Adds a spinner into the button.
  • size: (Optional) Defines the size of the button.
  • view: (Optional) Defines the look of the button.
type
name
id
text
submit
url
css
disabled
height
hidden
padding
width
circle
color
full
icon
loading
size
view
def to_dict(self) -> Dict[str, Any]:
69    def to_dict(self) -> Dict[str, Any]:
70        """
71        Converts the ButtonConfig into a dictionary format.
72        """
73        config_dict = {
74            'type': self.type,
75            'name': self.name,
76            'id': self.id,
77            'text': self.text,
78            'submit': self.submit,
79            'url': self.url,
80            'css': self.css,
81            'disabled': self.disabled,
82            'height': self.height,
83            'hidden': self.hidden,
84            'padding': self.padding,
85            'width': self.width,
86            'circle': self.circle,
87            'color': self.color,
88            'full': self.full,
89            'icon': self.icon,
90            'loading': self.loading,
91            'size': self.size,
92            'view': self.view
93        }
94        # Remove None values
95        return {k: v for k, v in config_dict.items() if v is not None}

Converts the ButtonConfig into a dictionary format.

class CheckboxConfig:
  6class CheckboxConfig:
  7    """
  8    Configuration class for the Checkbox control.
  9    """
 10    def __init__(self,
 11                 name: str = None,
 12                 id: str = None,
 13                 value: str = None,
 14                 checked: bool = False,
 15                 text: str = None,
 16                 css: str = None,
 17                 disabled: bool = False,
 18                 height: Union[str, int] = "content",
 19                 hidden: bool = False,
 20                 padding: Union[str, int] = "5px",
 21                 required: bool = False,
 22                 width: Union[str, int] = "content",
 23                 hiddenLabel: bool = False,
 24                 label: str = None,
 25                 labelPosition: str = "top",
 26                 labelWidth: Union[str, int] = None,
 27                 helpMessage: str = None,
 28                 preMessage: str = None,
 29                 successMessage: str = None,
 30                 errorMessage: str = None,
 31                 validation: Callable[[Any], bool] = None):
 32        """
 33        :param name: (Optional) The name of the control.
 34        :param id: (Optional) The id of the control.
 35        :param value: (Optional) The value of the checkbox.
 36        :param checked: (Optional) Defines the initial state of the checkbox.
 37        :param text: (Optional) The text value of the control displayed next to it.
 38        :param css: (Optional) Adds style classes to the control.
 39        :param disabled: (Optional) Whether the control is disabled.
 40        :param height: (Optional) The height of the control.
 41        :param hidden: (Optional) Whether the control is hidden.
 42        :param padding: (Optional) Sets padding between the cell and border.
 43        :param required: (Optional) Whether the control is required.
 44        :param width: (Optional) The width of the control.
 45        :param hiddenLabel: (Optional) Makes the label invisible.
 46        :param label: (Optional) Specifies a label for the control.
 47        :param labelPosition: (Optional) Defines the position of the label.
 48        :param labelWidth: (Optional) Sets the width of the label.
 49        :param helpMessage: (Optional) Adds a help message to the control.
 50        :param preMessage: (Optional) Instructions for interacting with the control.
 51        :param successMessage: (Optional) Message shown after successful validation.
 52        :param errorMessage: (Optional) Message shown after validation error.
 53        :param validation: (Optional) The validation function.
 54        """
 55        self.type = "checkbox"
 56        self.name = name
 57        self.id = id
 58        self.value = value
 59        self.checked = checked
 60        self.text = text
 61        self.css = css
 62        self.disabled = disabled
 63        self.height = height
 64        self.hidden = hidden
 65        self.padding = padding
 66        self.required = required
 67        self.width = width
 68        self.hiddenLabel = hiddenLabel
 69        self.label = label
 70        self.labelPosition = labelPosition
 71        self.labelWidth = labelWidth
 72        self.helpMessage = helpMessage
 73        self.preMessage = preMessage
 74        self.successMessage = successMessage
 75        self.errorMessage = errorMessage
 76        self.validation = validation
 77
 78    def to_dict(self) -> Dict[str, Any]:
 79        """
 80        Converts the CheckboxConfig into a dictionary format.
 81        """
 82        config_dict = {
 83            'type': self.type,
 84            'name': self.name,
 85            'id': self.id,
 86            'value': self.value,
 87            'checked': self.checked,
 88            'text': self.text,
 89            'css': self.css,
 90            'disabled': self.disabled,
 91            'height': self.height,
 92            'hidden': self.hidden,
 93            'padding': self.padding,
 94            'required': self.required,
 95            'width': self.width,
 96            'hiddenLabel': self.hiddenLabel,
 97            'label': self.label,
 98            'labelPosition': self.labelPosition,
 99            'labelWidth': self.labelWidth,
100            'helpMessage': self.helpMessage,
101            'preMessage': self.preMessage,
102            'successMessage': self.successMessage,
103            'errorMessage': self.errorMessage,
104            'validation': self.validation
105        }
106        # Remove None values
107        config_dict = {k: v for k, v in config_dict.items() if v is not None}
108
109        # Handle functions
110        if 'validation' in config_dict:
111            config_dict['validation'] = create_proxy(self.validation)
112
113        return config_dict

Configuration class for the Checkbox control.

CheckboxConfig( name: str = None, id: str = None, value: str = None, checked: bool = False, text: str = None, css: str = None, disabled: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', required: bool = False, width: Union[str, int] = 'content', hiddenLabel: bool = False, label: str = None, labelPosition: str = 'top', labelWidth: Union[str, int] = None, helpMessage: str = None, preMessage: str = None, successMessage: str = None, errorMessage: str = None, validation: Callable[[Any], bool] = None)
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 value: str = None,
14                 checked: bool = False,
15                 text: str = None,
16                 css: str = None,
17                 disabled: bool = False,
18                 height: Union[str, int] = "content",
19                 hidden: bool = False,
20                 padding: Union[str, int] = "5px",
21                 required: bool = False,
22                 width: Union[str, int] = "content",
23                 hiddenLabel: bool = False,
24                 label: str = None,
25                 labelPosition: str = "top",
26                 labelWidth: Union[str, int] = None,
27                 helpMessage: str = None,
28                 preMessage: str = None,
29                 successMessage: str = None,
30                 errorMessage: str = None,
31                 validation: Callable[[Any], bool] = None):
32        """
33        :param name: (Optional) The name of the control.
34        :param id: (Optional) The id of the control.
35        :param value: (Optional) The value of the checkbox.
36        :param checked: (Optional) Defines the initial state of the checkbox.
37        :param text: (Optional) The text value of the control displayed next to it.
38        :param css: (Optional) Adds style classes to the control.
39        :param disabled: (Optional) Whether the control is disabled.
40        :param height: (Optional) The height of the control.
41        :param hidden: (Optional) Whether the control is hidden.
42        :param padding: (Optional) Sets padding between the cell and border.
43        :param required: (Optional) Whether the control is required.
44        :param width: (Optional) The width of the control.
45        :param hiddenLabel: (Optional) Makes the label invisible.
46        :param label: (Optional) Specifies a label for the control.
47        :param labelPosition: (Optional) Defines the position of the label.
48        :param labelWidth: (Optional) Sets the width of the label.
49        :param helpMessage: (Optional) Adds a help message to the control.
50        :param preMessage: (Optional) Instructions for interacting with the control.
51        :param successMessage: (Optional) Message shown after successful validation.
52        :param errorMessage: (Optional) Message shown after validation error.
53        :param validation: (Optional) The validation function.
54        """
55        self.type = "checkbox"
56        self.name = name
57        self.id = id
58        self.value = value
59        self.checked = checked
60        self.text = text
61        self.css = css
62        self.disabled = disabled
63        self.height = height
64        self.hidden = hidden
65        self.padding = padding
66        self.required = required
67        self.width = width
68        self.hiddenLabel = hiddenLabel
69        self.label = label
70        self.labelPosition = labelPosition
71        self.labelWidth = labelWidth
72        self.helpMessage = helpMessage
73        self.preMessage = preMessage
74        self.successMessage = successMessage
75        self.errorMessage = errorMessage
76        self.validation = validation
Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • value: (Optional) The value of the checkbox.
  • checked: (Optional) Defines the initial state of the checkbox.
  • text: (Optional) The text value of the control displayed next to it.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • required: (Optional) Whether the control is required.
  • width: (Optional) The width of the control.
  • hiddenLabel: (Optional) Makes the label invisible.
  • label: (Optional) Specifies a label for the control.
  • labelPosition: (Optional) Defines the position of the label.
  • labelWidth: (Optional) Sets the width of the label.
  • helpMessage: (Optional) Adds a help message to the control.
  • preMessage: (Optional) Instructions for interacting with the control.
  • successMessage: (Optional) Message shown after successful validation.
  • errorMessage: (Optional) Message shown after validation error.
  • validation: (Optional) The validation function.
type
name
id
value
checked
text
css
disabled
height
hidden
padding
required
width
hiddenLabel
label
labelPosition
labelWidth
helpMessage
preMessage
successMessage
errorMessage
validation
def to_dict(self) -> Dict[str, Any]:
 78    def to_dict(self) -> Dict[str, Any]:
 79        """
 80        Converts the CheckboxConfig into a dictionary format.
 81        """
 82        config_dict = {
 83            'type': self.type,
 84            'name': self.name,
 85            'id': self.id,
 86            'value': self.value,
 87            'checked': self.checked,
 88            'text': self.text,
 89            'css': self.css,
 90            'disabled': self.disabled,
 91            'height': self.height,
 92            'hidden': self.hidden,
 93            'padding': self.padding,
 94            'required': self.required,
 95            'width': self.width,
 96            'hiddenLabel': self.hiddenLabel,
 97            'label': self.label,
 98            'labelPosition': self.labelPosition,
 99            'labelWidth': self.labelWidth,
100            'helpMessage': self.helpMessage,
101            'preMessage': self.preMessage,
102            'successMessage': self.successMessage,
103            'errorMessage': self.errorMessage,
104            'validation': self.validation
105        }
106        # Remove None values
107        config_dict = {k: v for k, v in config_dict.items() if v is not None}
108
109        # Handle functions
110        if 'validation' in config_dict:
111            config_dict['validation'] = create_proxy(self.validation)
112
113        return config_dict

Converts the CheckboxConfig into a dictionary format.

class CheckboxGroupConfig:
  6class CheckboxGroupConfig:
  7    """
  8    Configuration class for the CheckboxGroup control.
  9    """
 10    def __init__(self,
 11                 name: str = None,
 12                 id: str = None,
 13                 options: Dict[str, Any] = None,
 14                 value: Dict[str, Union[str, bool]] = None,
 15                 css: str = None,
 16                 disabled: bool = False,
 17                 height: Union[str, int] = "content",
 18                 hidden: bool = False,
 19                 padding: Union[str, int] = "5px",
 20                 required: bool = False,
 21                 width: Union[str, int] = "content",
 22                 hiddenLabel: bool = False,
 23                 label: str = None,
 24                 labelPosition: str = "top",
 25                 labelWidth: Union[str, int] = None,
 26                 helpMessage: str = None,
 27                 preMessage: str = None,
 28                 successMessage: str = None,
 29                 errorMessage: str = None,
 30                 validation: Callable[[Any], bool] = None):
 31        """
 32        :param name: (Optional) The name of the control.
 33        :param id: (Optional) The id of the control.
 34        :param options: (Required) An object with options of the CheckboxGroup.
 35        :param value: (Optional) An object with the initial value of the CheckboxGroup.
 36        :param css: (Optional) Adds style classes to the control.
 37        :param disabled: (Optional) Whether the control is disabled.
 38        :param height: (Optional) The height of the control.
 39        :param hidden: (Optional) Whether the control is hidden.
 40        :param padding: (Optional) Sets padding between the cell and border.
 41        :param required: (Optional) Whether the control is required.
 42        :param width: (Optional) The width of the control.
 43        :param hiddenLabel: (Optional) Makes the label invisible.
 44        :param label: (Optional) Specifies a label for the control.
 45        :param labelPosition: (Optional) Defines the position of the label.
 46        :param labelWidth: (Optional) Sets the width of the label.
 47        :param helpMessage: (Optional) Adds a help message to the control.
 48        :param preMessage: (Optional) Instructions for interacting with the control.
 49        :param successMessage: (Optional) Message shown after successful validation.
 50        :param errorMessage: (Optional) Message shown after validation error.
 51        :param validation: (Optional) The validation function.
 52        """
 53        self.type = "checkboxGroup"
 54        self.name = name
 55        self.id = id
 56        self.options = options or {}
 57        self.value = value
 58        self.css = css
 59        self.disabled = disabled
 60        self.height = height
 61        self.hidden = hidden
 62        self.padding = padding
 63        self.required = required
 64        self.width = width
 65        self.hiddenLabel = hiddenLabel
 66        self.label = label
 67        self.labelPosition = labelPosition
 68        self.labelWidth = labelWidth
 69        self.helpMessage = helpMessage
 70        self.preMessage = preMessage
 71        self.successMessage = successMessage
 72        self.errorMessage = errorMessage
 73        self.validation = validation
 74
 75    def to_dict(self) -> Dict[str, Any]:
 76        """
 77        Converts the CheckboxGroupConfig into a dictionary format.
 78        """
 79        def process_option(option):
 80            if isinstance(option, dict) and 'rows' in option:
 81                option['rows'] = [process_option(item) for item in option['rows']]
 82            elif hasattr(option, 'to_dict'):
 83                return option.to_dict()
 84            return option
 85
 86        config_dict = {
 87            'type': self.type,
 88            'name': self.name,
 89            'id': self.id,
 90            'options': process_option(self.options),
 91            'value': self.value,
 92            'css': self.css,
 93            'disabled': self.disabled,
 94            'height': self.height,
 95            'hidden': self.hidden,
 96            'padding': self.padding,
 97            'required': self.required,
 98            'width': self.width,
 99            'hiddenLabel': self.hiddenLabel,
100            'label': self.label,
101            'labelPosition': self.labelPosition,
102            'labelWidth': self.labelWidth,
103            'helpMessage': self.helpMessage,
104            'preMessage': self.preMessage,
105            'successMessage': self.successMessage,
106            'errorMessage': self.errorMessage,
107            'validation': self.validation
108        }
109
110        # Remove None values
111        config_dict = {k: v for k, v in config_dict.items() if v is not None}
112
113        # Handle functions
114        if 'validation' in config_dict:
115            config_dict['validation'] = create_proxy(self.validation)
116
117        return config_dict

Configuration class for the CheckboxGroup control.

CheckboxGroupConfig( name: str = None, id: str = None, options: Dict[str, Any] = None, value: Dict[str, Union[str, bool]] = None, css: str = None, disabled: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', required: bool = False, width: Union[str, int] = 'content', hiddenLabel: bool = False, label: str = None, labelPosition: str = 'top', labelWidth: Union[str, int] = None, helpMessage: str = None, preMessage: str = None, successMessage: str = None, errorMessage: str = None, validation: Callable[[Any], bool] = None)
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 options: Dict[str, Any] = None,
14                 value: Dict[str, Union[str, bool]] = None,
15                 css: str = None,
16                 disabled: bool = False,
17                 height: Union[str, int] = "content",
18                 hidden: bool = False,
19                 padding: Union[str, int] = "5px",
20                 required: bool = False,
21                 width: Union[str, int] = "content",
22                 hiddenLabel: bool = False,
23                 label: str = None,
24                 labelPosition: str = "top",
25                 labelWidth: Union[str, int] = None,
26                 helpMessage: str = None,
27                 preMessage: str = None,
28                 successMessage: str = None,
29                 errorMessage: str = None,
30                 validation: Callable[[Any], bool] = None):
31        """
32        :param name: (Optional) The name of the control.
33        :param id: (Optional) The id of the control.
34        :param options: (Required) An object with options of the CheckboxGroup.
35        :param value: (Optional) An object with the initial value of the CheckboxGroup.
36        :param css: (Optional) Adds style classes to the control.
37        :param disabled: (Optional) Whether the control is disabled.
38        :param height: (Optional) The height of the control.
39        :param hidden: (Optional) Whether the control is hidden.
40        :param padding: (Optional) Sets padding between the cell and border.
41        :param required: (Optional) Whether the control is required.
42        :param width: (Optional) The width of the control.
43        :param hiddenLabel: (Optional) Makes the label invisible.
44        :param label: (Optional) Specifies a label for the control.
45        :param labelPosition: (Optional) Defines the position of the label.
46        :param labelWidth: (Optional) Sets the width of the label.
47        :param helpMessage: (Optional) Adds a help message to the control.
48        :param preMessage: (Optional) Instructions for interacting with the control.
49        :param successMessage: (Optional) Message shown after successful validation.
50        :param errorMessage: (Optional) Message shown after validation error.
51        :param validation: (Optional) The validation function.
52        """
53        self.type = "checkboxGroup"
54        self.name = name
55        self.id = id
56        self.options = options or {}
57        self.value = value
58        self.css = css
59        self.disabled = disabled
60        self.height = height
61        self.hidden = hidden
62        self.padding = padding
63        self.required = required
64        self.width = width
65        self.hiddenLabel = hiddenLabel
66        self.label = label
67        self.labelPosition = labelPosition
68        self.labelWidth = labelWidth
69        self.helpMessage = helpMessage
70        self.preMessage = preMessage
71        self.successMessage = successMessage
72        self.errorMessage = errorMessage
73        self.validation = validation
Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • options: (Required) An object with options of the CheckboxGroup.
  • value: (Optional) An object with the initial value of the CheckboxGroup.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • required: (Optional) Whether the control is required.
  • width: (Optional) The width of the control.
  • hiddenLabel: (Optional) Makes the label invisible.
  • label: (Optional) Specifies a label for the control.
  • labelPosition: (Optional) Defines the position of the label.
  • labelWidth: (Optional) Sets the width of the label.
  • helpMessage: (Optional) Adds a help message to the control.
  • preMessage: (Optional) Instructions for interacting with the control.
  • successMessage: (Optional) Message shown after successful validation.
  • errorMessage: (Optional) Message shown after validation error.
  • validation: (Optional) The validation function.
type
name
id
options
value
css
disabled
height
hidden
padding
required
width
hiddenLabel
label
labelPosition
labelWidth
helpMessage
preMessage
successMessage
errorMessage
validation
def to_dict(self) -> Dict[str, Any]:
 75    def to_dict(self) -> Dict[str, Any]:
 76        """
 77        Converts the CheckboxGroupConfig into a dictionary format.
 78        """
 79        def process_option(option):
 80            if isinstance(option, dict) and 'rows' in option:
 81                option['rows'] = [process_option(item) for item in option['rows']]
 82            elif hasattr(option, 'to_dict'):
 83                return option.to_dict()
 84            return option
 85
 86        config_dict = {
 87            'type': self.type,
 88            'name': self.name,
 89            'id': self.id,
 90            'options': process_option(self.options),
 91            'value': self.value,
 92            'css': self.css,
 93            'disabled': self.disabled,
 94            'height': self.height,
 95            'hidden': self.hidden,
 96            'padding': self.padding,
 97            'required': self.required,
 98            'width': self.width,
 99            'hiddenLabel': self.hiddenLabel,
100            'label': self.label,
101            'labelPosition': self.labelPosition,
102            'labelWidth': self.labelWidth,
103            'helpMessage': self.helpMessage,
104            'preMessage': self.preMessage,
105            'successMessage': self.successMessage,
106            'errorMessage': self.errorMessage,
107            'validation': self.validation
108        }
109
110        # Remove None values
111        config_dict = {k: v for k, v in config_dict.items() if v is not None}
112
113        # Handle functions
114        if 'validation' in config_dict:
115            config_dict['validation'] = create_proxy(self.validation)
116
117        return config_dict

Converts the CheckboxGroupConfig into a dictionary format.

class ColorpickerConfig:
  7class ColorpickerConfig:
  8    """
  9    Configuration class for the ColorPicker control.
 10    """
 11    def __init__(self,
 12                 name: str = None,
 13                 id: str = None,
 14                 value: str = None,
 15                 css: str = None,
 16                 disabled: bool = False,
 17                 editable: bool = False,
 18                 height: Union[str, int] = "content",
 19                 hidden: bool = False,
 20                 padding: Union[str, int] = "5px",
 21                 required: bool = False,
 22                 validation: Callable[[Any], bool] = None,
 23                 width: Union[str, int] = "content",
 24                 customColors: bool = False,
 25                 grayShades: bool = True,
 26                 icon: str = None,
 27                 mode: str = "palette",
 28                 palette: Any = None,
 29                 paletteOnly: bool = False,
 30                 pickerOnly: bool = False,
 31                 placeholder: str = None,
 32                 hiddenLabel: bool = False,
 33                 label: str = None,
 34                 labelPosition: str = "top",
 35                 labelWidth: Union[str, int] = None,
 36                 helpMessage: str = None,
 37                 preMessage: str = None,
 38                 successMessage: str = None,
 39                 errorMessage: str = None):
 40        """
 41        :param name: (Optional) The name of the control.
 42        :param id: (Optional) The id of the control.
 43        :param value: (Optional) The value of the colorpicker.
 44        :param css: (Optional) Adds style classes to the control.
 45        :param disabled: (Optional) Whether the control is disabled.
 46        :param editable: (Optional) Allows user to enter the value manually.
 47        :param height: (Optional) The height of the control.
 48        :param hidden: (Optional) Whether the control is hidden.
 49        :param padding: (Optional) Sets padding between the cell and border.
 50        :param required: (Optional) Whether the control is required.
 51        :param validation: (Optional) The validation function.
 52        :param width: (Optional) The width of the control.
 53        :param customColors: (Optional) Shows a section with custom colors.
 54        :param grayShades: (Optional) Displays gray shades in the palette.
 55        :param icon: (Optional) The CSS class name of an icon.
 56        :param mode: (Optional) The mode of the control ("palette", "picker").
 57        :param palette: (Optional) Arrays of colors to be shown in the colorpicker.
 58        :param paletteOnly: (Optional) Shows only the palette mode.
 59        :param pickerOnly: (Optional) Shows only the picker mode.
 60        :param placeholder: (Optional) A tip for the input.
 61        :param hiddenLabel: (Optional) Makes the label invisible.
 62        :param label: (Optional) Specifies a label for the control.
 63        :param labelPosition: (Optional) Position of the label.
 64        :param labelWidth: (Optional) Width of the label.
 65        :param helpMessage: (Optional) Adds a help message to the control.
 66        :param preMessage: (Optional) Instructions for interacting with the control.
 67        :param successMessage: (Optional) Message after successful validation.
 68        :param errorMessage: (Optional) Message after validation error.
 69        """
 70        self.type = "colorpicker"
 71        self.name = name
 72        self.id = id
 73        self.value = value
 74        self.css = css
 75        self.disabled = disabled
 76        self.editable = editable
 77        self.height = height
 78        self.hidden = hidden
 79        self.padding = padding
 80        self.required = required
 81        self.validation = validation
 82        self.width = width
 83        self.customColors = customColors
 84        self.grayShades = grayShades
 85        self.icon = icon
 86        self.mode = mode
 87        self.palette = palette
 88        self.paletteOnly = paletteOnly
 89        self.pickerOnly = pickerOnly
 90        self.placeholder = placeholder
 91        self.hiddenLabel = hiddenLabel
 92        self.label = label
 93        self.labelPosition = labelPosition
 94        self.labelWidth = labelWidth
 95        self.helpMessage = helpMessage
 96        self.preMessage = preMessage
 97        self.successMessage = successMessage
 98        self.errorMessage = errorMessage
 99
100    def to_dict(self) -> Dict[str, Any]:
101        """
102        Converts the ColorPickerConfig into a dictionary format.
103        """
104        config_dict = {
105            'type': self.type,
106            'name': self.name,
107            'id': self.id,
108            'value': self.value,
109            'css': self.css,
110            'disabled': self.disabled,
111            'editable': self.editable,
112            'height': self.height,
113            'hidden': self.hidden,
114            'padding': self.padding,
115            'required': self.required,
116            'width': self.width,
117            'customColors': self.customColors,
118            'grayShades': self.grayShades,
119            'icon': self.icon,
120            'mode': self.mode,
121            'palette': self.palette,
122            'paletteOnly': self.paletteOnly,
123            'pickerOnly': self.pickerOnly,
124            'placeholder': self.placeholder,
125            'hiddenLabel': self.hiddenLabel,
126            'label': self.label,
127            'labelPosition': self.labelPosition,
128            'labelWidth': self.labelWidth,
129            'helpMessage': self.helpMessage,
130            'preMessage': self.preMessage,
131            'successMessage': self.successMessage,
132            'errorMessage': self.errorMessage,
133            'validation': self.validation
134        }
135        # Remove None values
136        config_dict = {k: v for k, v in config_dict.items() if v is not None}
137
138        # Handle functions
139        if 'validation' in config_dict:
140            config_dict['validation'] = create_proxy(self.validation)
141
142        return config_dict

Configuration class for the ColorPicker control.

ColorpickerConfig( name: str = None, id: str = None, value: str = None, css: str = None, disabled: bool = False, editable: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', required: bool = False, validation: Callable[[Any], bool] = None, width: Union[str, int] = 'content', customColors: bool = False, grayShades: bool = True, icon: str = None, mode: str = 'palette', palette: Any = None, paletteOnly: bool = False, pickerOnly: bool = False, placeholder: str = None, hiddenLabel: bool = False, label: str = None, labelPosition: str = 'top', labelWidth: Union[str, int] = None, helpMessage: str = None, preMessage: str = None, successMessage: str = None, errorMessage: str = None)
11    def __init__(self,
12                 name: str = None,
13                 id: str = None,
14                 value: str = None,
15                 css: str = None,
16                 disabled: bool = False,
17                 editable: bool = False,
18                 height: Union[str, int] = "content",
19                 hidden: bool = False,
20                 padding: Union[str, int] = "5px",
21                 required: bool = False,
22                 validation: Callable[[Any], bool] = None,
23                 width: Union[str, int] = "content",
24                 customColors: bool = False,
25                 grayShades: bool = True,
26                 icon: str = None,
27                 mode: str = "palette",
28                 palette: Any = None,
29                 paletteOnly: bool = False,
30                 pickerOnly: bool = False,
31                 placeholder: str = None,
32                 hiddenLabel: bool = False,
33                 label: str = None,
34                 labelPosition: str = "top",
35                 labelWidth: Union[str, int] = None,
36                 helpMessage: str = None,
37                 preMessage: str = None,
38                 successMessage: str = None,
39                 errorMessage: str = None):
40        """
41        :param name: (Optional) The name of the control.
42        :param id: (Optional) The id of the control.
43        :param value: (Optional) The value of the colorpicker.
44        :param css: (Optional) Adds style classes to the control.
45        :param disabled: (Optional) Whether the control is disabled.
46        :param editable: (Optional) Allows user to enter the value manually.
47        :param height: (Optional) The height of the control.
48        :param hidden: (Optional) Whether the control is hidden.
49        :param padding: (Optional) Sets padding between the cell and border.
50        :param required: (Optional) Whether the control is required.
51        :param validation: (Optional) The validation function.
52        :param width: (Optional) The width of the control.
53        :param customColors: (Optional) Shows a section with custom colors.
54        :param grayShades: (Optional) Displays gray shades in the palette.
55        :param icon: (Optional) The CSS class name of an icon.
56        :param mode: (Optional) The mode of the control ("palette", "picker").
57        :param palette: (Optional) Arrays of colors to be shown in the colorpicker.
58        :param paletteOnly: (Optional) Shows only the palette mode.
59        :param pickerOnly: (Optional) Shows only the picker mode.
60        :param placeholder: (Optional) A tip for the input.
61        :param hiddenLabel: (Optional) Makes the label invisible.
62        :param label: (Optional) Specifies a label for the control.
63        :param labelPosition: (Optional) Position of the label.
64        :param labelWidth: (Optional) Width of the label.
65        :param helpMessage: (Optional) Adds a help message to the control.
66        :param preMessage: (Optional) Instructions for interacting with the control.
67        :param successMessage: (Optional) Message after successful validation.
68        :param errorMessage: (Optional) Message after validation error.
69        """
70        self.type = "colorpicker"
71        self.name = name
72        self.id = id
73        self.value = value
74        self.css = css
75        self.disabled = disabled
76        self.editable = editable
77        self.height = height
78        self.hidden = hidden
79        self.padding = padding
80        self.required = required
81        self.validation = validation
82        self.width = width
83        self.customColors = customColors
84        self.grayShades = grayShades
85        self.icon = icon
86        self.mode = mode
87        self.palette = palette
88        self.paletteOnly = paletteOnly
89        self.pickerOnly = pickerOnly
90        self.placeholder = placeholder
91        self.hiddenLabel = hiddenLabel
92        self.label = label
93        self.labelPosition = labelPosition
94        self.labelWidth = labelWidth
95        self.helpMessage = helpMessage
96        self.preMessage = preMessage
97        self.successMessage = successMessage
98        self.errorMessage = errorMessage
Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • value: (Optional) The value of the colorpicker.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • editable: (Optional) Allows user to enter the value manually.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • required: (Optional) Whether the control is required.
  • validation: (Optional) The validation function.
  • width: (Optional) The width of the control.
  • customColors: (Optional) Shows a section with custom colors.
  • grayShades: (Optional) Displays gray shades in the palette.
  • icon: (Optional) The CSS class name of an icon.
  • mode: (Optional) The mode of the control ("palette", "picker").
  • palette: (Optional) Arrays of colors to be shown in the colorpicker.
  • paletteOnly: (Optional) Shows only the palette mode.
  • pickerOnly: (Optional) Shows only the picker mode.
  • placeholder: (Optional) A tip for the input.
  • hiddenLabel: (Optional) Makes the label invisible.
  • label: (Optional) Specifies a label for the control.
  • labelPosition: (Optional) Position of the label.
  • labelWidth: (Optional) Width of the label.
  • helpMessage: (Optional) Adds a help message to the control.
  • preMessage: (Optional) Instructions for interacting with the control.
  • successMessage: (Optional) Message after successful validation.
  • errorMessage: (Optional) Message after validation error.
type
name
id
value
css
disabled
editable
height
hidden
padding
required
validation
width
customColors
grayShades
icon
mode
palette
paletteOnly
pickerOnly
placeholder
hiddenLabel
label
labelPosition
labelWidth
helpMessage
preMessage
successMessage
errorMessage
def to_dict(self) -> Dict[str, Any]:
100    def to_dict(self) -> Dict[str, Any]:
101        """
102        Converts the ColorPickerConfig into a dictionary format.
103        """
104        config_dict = {
105            'type': self.type,
106            'name': self.name,
107            'id': self.id,
108            'value': self.value,
109            'css': self.css,
110            'disabled': self.disabled,
111            'editable': self.editable,
112            'height': self.height,
113            'hidden': self.hidden,
114            'padding': self.padding,
115            'required': self.required,
116            'width': self.width,
117            'customColors': self.customColors,
118            'grayShades': self.grayShades,
119            'icon': self.icon,
120            'mode': self.mode,
121            'palette': self.palette,
122            'paletteOnly': self.paletteOnly,
123            'pickerOnly': self.pickerOnly,
124            'placeholder': self.placeholder,
125            'hiddenLabel': self.hiddenLabel,
126            'label': self.label,
127            'labelPosition': self.labelPosition,
128            'labelWidth': self.labelWidth,
129            'helpMessage': self.helpMessage,
130            'preMessage': self.preMessage,
131            'successMessage': self.successMessage,
132            'errorMessage': self.errorMessage,
133            'validation': self.validation
134        }
135        # Remove None values
136        config_dict = {k: v for k, v in config_dict.items() if v is not None}
137
138        # Handle functions
139        if 'validation' in config_dict:
140            config_dict['validation'] = create_proxy(self.validation)
141
142        return config_dict

Converts the ColorPickerConfig into a dictionary format.

class ComboConfig:
  7class ComboConfig:
  8    """
  9    Configuration class for the Combo control.
 10    """
 11    def __init__(self,
 12                 name: str = None,
 13                 id: str = None,
 14                 data: List[Dict[str, Any]] = None,
 15                 value: Union[str, int, List[Union[str, int]]] = None,
 16                 css: str = None,
 17                 disabled: bool = False,
 18                 height: Union[str, int] = "content",
 19                 hidden: bool = False,
 20                 padding: Union[str, int] = "5px",
 21                 required: bool = False,
 22                 validation: Callable[[Any], bool] = None,
 23                 width: Union[str, int] = "content",
 24                 filter: Callable[[Any], bool] = None,
 25                 eventHandlers: Dict[str, Callable] = None,
 26                 itemHeight: int = 32,
 27                 itemsCount: bool = False,
 28                 listHeight: int = 224,
 29                 multiselection: bool = False,
 30                 newOptions: bool = False,
 31                 placeholder: str = None,
 32                 readOnly: bool = False,
 33                 selectAllButton: bool = False,
 34                 template: str = None,
 35                 virtual: bool = False,
 36                 hiddenLabel: bool = False,
 37                 label: str = None,
 38                 labelPosition: str = "top",
 39                 labelWidth: Union[str, int] = None,
 40                 helpMessage: str = None,
 41                 preMessage: str = None,
 42                 successMessage: str = None,
 43                 errorMessage: str = None):
 44        """
 45        :param name: (Optional) The name of the control.
 46        :param id: (Optional) The id of the control.
 47        :param data: (Optional) An array of Combo options.
 48        :param value: (Optional) The id(s) of options to be selected.
 49        :param css: (Optional) Adds style classes to the control.
 50        :param disabled: (Optional) Whether the control is disabled.
 51        :param height: (Optional) The height of the control.
 52        :param hidden: (Optional) Whether the control is hidden.
 53        :param padding: (Optional) Sets padding between the cell and border.
 54        :param required: (Optional) Whether the control is required.
 55        :param validation: (Optional) A callback function for validation.
 56        :param width: (Optional) The width of the control.
 57        :param filter: (Optional) Custom function for filtering options.
 58        :param eventHandlers: (Optional) Event handlers for custom templates.
 59        :param itemHeight: (Optional) Height of a cell in the options list.
 60        :param itemsCount: (Optional) Shows the total number of selected options.
 61        :param listHeight: (Optional) Height of the list of options.
 62        :param multiselection: (Optional) Enables multiple selection.
 63        :param newOptions: (Optional) Allows users to add new options.
 64        :param placeholder: (Optional) Placeholder in the input field.
 65        :param readOnly: (Optional) Makes Combo readonly.
 66        :param selectAllButton: (Optional) Shows the Select All button.
 67        :param template: (Optional) Template for displaying options.
 68        :param virtual: (Optional) Enables dynamic loading of data.
 69        :param hiddenLabel: (Optional) Makes the label invisible.
 70        :param label: (Optional) Specifies a label for the control.
 71        :param labelPosition: (Optional) Position of the label.
 72        :param labelWidth: (Optional) Width of the label.
 73        :param helpMessage: (Optional) Adds a help message to the control.
 74        :param preMessage: (Optional) Instructions for interacting with the control.
 75        :param successMessage: (Optional) Message after successful validation.
 76        :param errorMessage: (Optional) Message after validation error.
 77        """
 78        self.type = "combo"
 79        self.name = name
 80        self.id = id
 81        self.data = data
 82        self.value = value
 83        self.css = css
 84        self.disabled = disabled
 85        self.height = height
 86        self.hidden = hidden
 87        self.padding = padding
 88        self.required = required
 89        self.validation = validation
 90        self.width = width
 91        self.filter = filter
 92        self.eventHandlers = eventHandlers
 93        self.itemHeight = itemHeight
 94        self.itemsCount = itemsCount
 95        self.listHeight = listHeight
 96        self.multiselection = multiselection
 97        self.newOptions = newOptions
 98        self.placeholder = placeholder
 99        self.readOnly = readOnly
100        self.selectAllButton = selectAllButton
101        self.template = template
102        self.virtual = virtual
103        self.hiddenLabel = hiddenLabel
104        self.label = label
105        self.labelPosition = labelPosition
106        self.labelWidth = labelWidth
107        self.helpMessage = helpMessage
108        self.preMessage = preMessage
109        self.successMessage = successMessage
110        self.errorMessage = errorMessage
111
112    def to_dict(self) -> Dict[str, Any]:
113        """
114        Converts the ComboConfig into a dictionary format.
115        """
116        config_dict = {
117            'type': self.type,
118            'name': self.name,
119            'id': self.id,
120            'data': self.data,
121            'value': self.value,
122            'css': self.css,
123            'disabled': self.disabled,
124            'height': self.height,
125            'hidden': self.hidden,
126            'padding': self.padding,
127            'required': self.required,
128            'width': self.width,
129            'validation': self.validation,
130            'filter': self.filter,
131            'eventHandlers': self.eventHandlers,
132            'itemHeight': self.itemHeight,
133            'itemsCount': self.itemsCount,
134            'listHeight': self.listHeight,
135            'multiselection': self.multiselection,
136            'newOptions': self.newOptions,
137            'placeholder': self.placeholder,
138            'readOnly': self.readOnly,
139            'selectAllButton': self.selectAllButton,
140            'template': self.template,
141            'virtual': self.virtual,
142            'hiddenLabel': self.hiddenLabel,
143            'label': self.label,
144            'labelPosition': self.labelPosition,
145            'labelWidth': self.labelWidth,
146            'helpMessage': self.helpMessage,
147            'preMessage': self.preMessage,
148            'successMessage': self.successMessage,
149            'errorMessage': self.errorMessage
150        }
151        # Remove None values
152        config_dict = {k: v for k, v in config_dict.items() if v is not None}
153
154        # Handle functions
155        if 'validation' in config_dict:
156            config_dict['validation'] = create_proxy(self.validation)
157        if 'filter' in config_dict:
158            config_dict['filter'] = create_proxy(self.filter)
159        if 'eventHandlers' in config_dict:
160            event_handlers = {k: create_proxy(v) for k, v in config_dict['eventHandlers'].items()}
161            config_dict['eventHandlers'] = event_handlers
162
163        return config_dict

Configuration class for the Combo control.

ComboConfig( name: str = None, id: str = None, data: List[Dict[str, Any]] = None, value: Union[str, int, List[Union[str, int]]] = None, css: str = None, disabled: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', required: bool = False, validation: Callable[[Any], bool] = None, width: Union[str, int] = 'content', filter: Callable[[Any], bool] = None, eventHandlers: Dict[str, Callable] = None, itemHeight: int = 32, itemsCount: bool = False, listHeight: int = 224, multiselection: bool = False, newOptions: bool = False, placeholder: str = None, readOnly: bool = False, selectAllButton: bool = False, template: str = None, virtual: bool = False, hiddenLabel: bool = False, label: str = None, labelPosition: str = 'top', labelWidth: Union[str, int] = None, helpMessage: str = None, preMessage: str = None, successMessage: str = None, errorMessage: str = None)
 11    def __init__(self,
 12                 name: str = None,
 13                 id: str = None,
 14                 data: List[Dict[str, Any]] = None,
 15                 value: Union[str, int, List[Union[str, int]]] = None,
 16                 css: str = None,
 17                 disabled: bool = False,
 18                 height: Union[str, int] = "content",
 19                 hidden: bool = False,
 20                 padding: Union[str, int] = "5px",
 21                 required: bool = False,
 22                 validation: Callable[[Any], bool] = None,
 23                 width: Union[str, int] = "content",
 24                 filter: Callable[[Any], bool] = None,
 25                 eventHandlers: Dict[str, Callable] = None,
 26                 itemHeight: int = 32,
 27                 itemsCount: bool = False,
 28                 listHeight: int = 224,
 29                 multiselection: bool = False,
 30                 newOptions: bool = False,
 31                 placeholder: str = None,
 32                 readOnly: bool = False,
 33                 selectAllButton: bool = False,
 34                 template: str = None,
 35                 virtual: bool = False,
 36                 hiddenLabel: bool = False,
 37                 label: str = None,
 38                 labelPosition: str = "top",
 39                 labelWidth: Union[str, int] = None,
 40                 helpMessage: str = None,
 41                 preMessage: str = None,
 42                 successMessage: str = None,
 43                 errorMessage: str = None):
 44        """
 45        :param name: (Optional) The name of the control.
 46        :param id: (Optional) The id of the control.
 47        :param data: (Optional) An array of Combo options.
 48        :param value: (Optional) The id(s) of options to be selected.
 49        :param css: (Optional) Adds style classes to the control.
 50        :param disabled: (Optional) Whether the control is disabled.
 51        :param height: (Optional) The height of the control.
 52        :param hidden: (Optional) Whether the control is hidden.
 53        :param padding: (Optional) Sets padding between the cell and border.
 54        :param required: (Optional) Whether the control is required.
 55        :param validation: (Optional) A callback function for validation.
 56        :param width: (Optional) The width of the control.
 57        :param filter: (Optional) Custom function for filtering options.
 58        :param eventHandlers: (Optional) Event handlers for custom templates.
 59        :param itemHeight: (Optional) Height of a cell in the options list.
 60        :param itemsCount: (Optional) Shows the total number of selected options.
 61        :param listHeight: (Optional) Height of the list of options.
 62        :param multiselection: (Optional) Enables multiple selection.
 63        :param newOptions: (Optional) Allows users to add new options.
 64        :param placeholder: (Optional) Placeholder in the input field.
 65        :param readOnly: (Optional) Makes Combo readonly.
 66        :param selectAllButton: (Optional) Shows the Select All button.
 67        :param template: (Optional) Template for displaying options.
 68        :param virtual: (Optional) Enables dynamic loading of data.
 69        :param hiddenLabel: (Optional) Makes the label invisible.
 70        :param label: (Optional) Specifies a label for the control.
 71        :param labelPosition: (Optional) Position of the label.
 72        :param labelWidth: (Optional) Width of the label.
 73        :param helpMessage: (Optional) Adds a help message to the control.
 74        :param preMessage: (Optional) Instructions for interacting with the control.
 75        :param successMessage: (Optional) Message after successful validation.
 76        :param errorMessage: (Optional) Message after validation error.
 77        """
 78        self.type = "combo"
 79        self.name = name
 80        self.id = id
 81        self.data = data
 82        self.value = value
 83        self.css = css
 84        self.disabled = disabled
 85        self.height = height
 86        self.hidden = hidden
 87        self.padding = padding
 88        self.required = required
 89        self.validation = validation
 90        self.width = width
 91        self.filter = filter
 92        self.eventHandlers = eventHandlers
 93        self.itemHeight = itemHeight
 94        self.itemsCount = itemsCount
 95        self.listHeight = listHeight
 96        self.multiselection = multiselection
 97        self.newOptions = newOptions
 98        self.placeholder = placeholder
 99        self.readOnly = readOnly
100        self.selectAllButton = selectAllButton
101        self.template = template
102        self.virtual = virtual
103        self.hiddenLabel = hiddenLabel
104        self.label = label
105        self.labelPosition = labelPosition
106        self.labelWidth = labelWidth
107        self.helpMessage = helpMessage
108        self.preMessage = preMessage
109        self.successMessage = successMessage
110        self.errorMessage = errorMessage
Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • data: (Optional) An array of Combo options.
  • value: (Optional) The id(s) of options to be selected.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • required: (Optional) Whether the control is required.
  • validation: (Optional) A callback function for validation.
  • width: (Optional) The width of the control.
  • filter: (Optional) Custom function for filtering options.
  • eventHandlers: (Optional) Event handlers for custom templates.
  • itemHeight: (Optional) Height of a cell in the options list.
  • itemsCount: (Optional) Shows the total number of selected options.
  • listHeight: (Optional) Height of the list of options.
  • multiselection: (Optional) Enables multiple selection.
  • newOptions: (Optional) Allows users to add new options.
  • placeholder: (Optional) Placeholder in the input field.
  • readOnly: (Optional) Makes Combo readonly.
  • selectAllButton: (Optional) Shows the Select All button.
  • template: (Optional) Template for displaying options.
  • virtual: (Optional) Enables dynamic loading of data.
  • hiddenLabel: (Optional) Makes the label invisible.
  • label: (Optional) Specifies a label for the control.
  • labelPosition: (Optional) Position of the label.
  • labelWidth: (Optional) Width of the label.
  • helpMessage: (Optional) Adds a help message to the control.
  • preMessage: (Optional) Instructions for interacting with the control.
  • successMessage: (Optional) Message after successful validation.
  • errorMessage: (Optional) Message after validation error.
type
name
id
data
value
css
disabled
height
hidden
padding
required
validation
width
filter
eventHandlers
itemHeight
itemsCount
listHeight
multiselection
newOptions
placeholder
readOnly
selectAllButton
template
virtual
hiddenLabel
label
labelPosition
labelWidth
helpMessage
preMessage
successMessage
errorMessage
def to_dict(self) -> Dict[str, Any]:
112    def to_dict(self) -> Dict[str, Any]:
113        """
114        Converts the ComboConfig into a dictionary format.
115        """
116        config_dict = {
117            'type': self.type,
118            'name': self.name,
119            'id': self.id,
120            'data': self.data,
121            'value': self.value,
122            'css': self.css,
123            'disabled': self.disabled,
124            'height': self.height,
125            'hidden': self.hidden,
126            'padding': self.padding,
127            'required': self.required,
128            'width': self.width,
129            'validation': self.validation,
130            'filter': self.filter,
131            'eventHandlers': self.eventHandlers,
132            'itemHeight': self.itemHeight,
133            'itemsCount': self.itemsCount,
134            'listHeight': self.listHeight,
135            'multiselection': self.multiselection,
136            'newOptions': self.newOptions,
137            'placeholder': self.placeholder,
138            'readOnly': self.readOnly,
139            'selectAllButton': self.selectAllButton,
140            'template': self.template,
141            'virtual': self.virtual,
142            'hiddenLabel': self.hiddenLabel,
143            'label': self.label,
144            'labelPosition': self.labelPosition,
145            'labelWidth': self.labelWidth,
146            'helpMessage': self.helpMessage,
147            'preMessage': self.preMessage,
148            'successMessage': self.successMessage,
149            'errorMessage': self.errorMessage
150        }
151        # Remove None values
152        config_dict = {k: v for k, v in config_dict.items() if v is not None}
153
154        # Handle functions
155        if 'validation' in config_dict:
156            config_dict['validation'] = create_proxy(self.validation)
157        if 'filter' in config_dict:
158            config_dict['filter'] = create_proxy(self.filter)
159        if 'eventHandlers' in config_dict:
160            event_handlers = {k: create_proxy(v) for k, v in config_dict['eventHandlers'].items()}
161            config_dict['eventHandlers'] = event_handlers
162
163        return config_dict

Converts the ComboConfig into a dictionary format.

class ContainerConfig:
 6class ContainerConfig:
 7    """
 8    Configuration class for the Container control.
 9    """
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 html: str = None,
14                 css: str = None,
15                 disabled: bool = False,
16                 height: Union[str, int] = "content",
17                 hidden: bool = False,
18                 padding: Union[str, int] = "5px",
19                 width: Union[str, int] = "content",
20                 label: str = None,
21                 labelWidth: Union[str, int] = None,
22                 labelPosition: str = "top",
23                 hiddenLabel: bool = False,
24                 helpMessage: str = None):
25        """
26        :param name: (Optional) The name of the control.
27        :param id: (Optional) The id of the control.
28        :param html: (Optional) The HTML content of the control.
29        :param css: (Optional) Adds style classes to the control.
30        :param disabled: (Optional) Whether the control is disabled.
31        :param height: (Optional) The height of the control.
32        :param hidden: (Optional) Whether the control is hidden.
33        :param padding: (Optional) Sets padding between the cell and border.
34        :param width: (Optional) The width of the control.
35        :param label: (Optional) Specifies a label for the control.
36        :param labelWidth: (Optional) Width of the label.
37        :param labelPosition: (Optional) Position of the label.
38        :param hiddenLabel: (Optional) Makes the label invisible.
39        :param helpMessage: (Optional) Adds a help message to the control.
40        """
41        self.type = "container"
42        self.name = name
43        self.id = id
44        self.html = html
45        self.css = css
46        self.disabled = disabled
47        self.height = height
48        self.hidden = hidden
49        self.padding = padding
50        self.width = width
51        self.label = label
52        self.labelWidth = labelWidth
53        self.labelPosition = labelPosition
54        self.hiddenLabel = hiddenLabel
55        self.helpMessage = helpMessage
56
57    def to_dict(self) -> Dict[str, Any]:
58        """
59        Converts the ContainerConfig into a dictionary format.
60        """
61        config_dict = {
62            'type': self.type,
63            'name': self.name,
64            'id': self.id,
65            'html': self.html,
66            'css': self.css,
67            'disabled': self.disabled,
68            'height': self.height,
69            'hidden': self.hidden,
70            'padding': self.padding,
71            'width': self.width,
72            'label': self.label,
73            'labelWidth': self.labelWidth,
74            'labelPosition': self.labelPosition,
75            'hiddenLabel': self.hiddenLabel,
76            'helpMessage': self.helpMessage
77        }
78        # Remove None values
79        return {k: v for k, v in config_dict.items() if v is not None}

Configuration class for the Container control.

ContainerConfig( name: str = None, id: str = None, html: str = None, css: str = None, disabled: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', width: Union[str, int] = 'content', label: str = None, labelWidth: Union[str, int] = None, labelPosition: str = 'top', hiddenLabel: bool = False, helpMessage: str = None)
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 html: str = None,
14                 css: str = None,
15                 disabled: bool = False,
16                 height: Union[str, int] = "content",
17                 hidden: bool = False,
18                 padding: Union[str, int] = "5px",
19                 width: Union[str, int] = "content",
20                 label: str = None,
21                 labelWidth: Union[str, int] = None,
22                 labelPosition: str = "top",
23                 hiddenLabel: bool = False,
24                 helpMessage: str = None):
25        """
26        :param name: (Optional) The name of the control.
27        :param id: (Optional) The id of the control.
28        :param html: (Optional) The HTML content of the control.
29        :param css: (Optional) Adds style classes to the control.
30        :param disabled: (Optional) Whether the control is disabled.
31        :param height: (Optional) The height of the control.
32        :param hidden: (Optional) Whether the control is hidden.
33        :param padding: (Optional) Sets padding between the cell and border.
34        :param width: (Optional) The width of the control.
35        :param label: (Optional) Specifies a label for the control.
36        :param labelWidth: (Optional) Width of the label.
37        :param labelPosition: (Optional) Position of the label.
38        :param hiddenLabel: (Optional) Makes the label invisible.
39        :param helpMessage: (Optional) Adds a help message to the control.
40        """
41        self.type = "container"
42        self.name = name
43        self.id = id
44        self.html = html
45        self.css = css
46        self.disabled = disabled
47        self.height = height
48        self.hidden = hidden
49        self.padding = padding
50        self.width = width
51        self.label = label
52        self.labelWidth = labelWidth
53        self.labelPosition = labelPosition
54        self.hiddenLabel = hiddenLabel
55        self.helpMessage = helpMessage
Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • html: (Optional) The HTML content of the control.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • width: (Optional) The width of the control.
  • label: (Optional) Specifies a label for the control.
  • labelWidth: (Optional) Width of the label.
  • labelPosition: (Optional) Position of the label.
  • hiddenLabel: (Optional) Makes the label invisible.
  • helpMessage: (Optional) Adds a help message to the control.
type
name
id
html
css
disabled
height
hidden
padding
width
label
labelWidth
labelPosition
hiddenLabel
helpMessage
def to_dict(self) -> Dict[str, Any]:
57    def to_dict(self) -> Dict[str, Any]:
58        """
59        Converts the ContainerConfig into a dictionary format.
60        """
61        config_dict = {
62            'type': self.type,
63            'name': self.name,
64            'id': self.id,
65            'html': self.html,
66            'css': self.css,
67            'disabled': self.disabled,
68            'height': self.height,
69            'hidden': self.hidden,
70            'padding': self.padding,
71            'width': self.width,
72            'label': self.label,
73            'labelWidth': self.labelWidth,
74            'labelPosition': self.labelPosition,
75            'hiddenLabel': self.hiddenLabel,
76            'helpMessage': self.helpMessage
77        }
78        # Remove None values
79        return {k: v for k, v in config_dict.items() if v is not None}

Converts the ContainerConfig into a dictionary format.

class DatepickerConfig:
  7class DatepickerConfig:
  8    """
  9    Configuration class for the DatePicker control.
 10    """
 11    def __init__(self,
 12                 name: str = None,
 13                 id: str = None,
 14                 value: Union[str, Any] = None,
 15                 css: str = None,
 16                 disabled: bool = False,
 17                 editable: bool = False,
 18                 height: Union[str, int] = "content",
 19                 hidden: bool = False,
 20                 padding: Union[str, int] = "5px",
 21                 required: bool = False,
 22                 validation: Callable[[Any], bool] = None,
 23                 width: Union[str, int] = "content",
 24                 date: Union[str, Any] = None,
 25                 dateFormat: str = "%d/%m/%y",
 26                 disabledDates: Any = None,
 27                 icon: str = None,
 28                 mark: Any = None,
 29                 mode: str = "calendar",
 30                 placeholder: str = None,
 31                 thisMonthOnly: bool = False,
 32                 timeFormat: Union[int, str] = 24,
 33                 timePicker: bool = False,
 34                 valueFormat: str = "string",
 35                 weekNumbers: bool = False,
 36                 weekStart: str = "sunday",
 37                 hiddenLabel: bool = False,
 38                 label: str = None,
 39                 labelPosition: str = "top",
 40                 labelWidth: Union[str, int] = None,
 41                 helpMessage: str = None,
 42                 preMessage: str = None,
 43                 successMessage: str = None,
 44                 errorMessage: str = None):
 45        """
 46        Initializes the DatePickerConfig.
 47
 48        :param name: (Optional) The name of the control.
 49        :param id: (Optional) The id of the control.
 50        :param value: (Optional) The value of the datepicker.
 51        :param css: (Optional) Adds style classes to the control.
 52        :param disabled: (Optional) Whether the control is disabled.
 53        :param editable: (Optional) Allows user to enter the value manually.
 54        :param height: (Optional) The height of the control.
 55        :param hidden: (Optional) Whether the control is hidden.
 56        :param padding: (Optional) Sets padding between the cell and border.
 57        :param required: (Optional) Whether the control is required.
 58        :param validation: (Optional) The validation function.
 59        :param width: (Optional) The width of the control.
 60        :param date: (Optional) The date that will be opened when the calendar is created.
 61        :param dateFormat: (Optional) The format of dates in the calendar.
 62        :param disabledDates: (Optional) Disables some date intervals.
 63        :param icon: (Optional) The CSS class name of an icon.
 64        :param mark: (Optional) Adds a CSS class to specific days.
 65        :param mode: (Optional) Specifies the mode of displaying a calendar.
 66        :param placeholder: (Optional) A tip for the input.
 67        :param thisMonthOnly: (Optional) Hides dates of the previous/next months.
 68        :param timeFormat: (Optional) Time format of a timepicker: 12 or 24.
 69        :param timePicker: (Optional) Adds a timepicker into the calendar.
 70        :param valueFormat: (Optional) Format of the returned value: "string" or "Date".
 71        :param weekNumbers: (Optional) Shows the numbers of weeks.
 72        :param weekStart: (Optional) Starting day of the week.
 73        :param hiddenLabel: (Optional) Makes the label invisible.
 74        :param label: (Optional) Specifies a label for the control.
 75        :param labelPosition: (Optional) Position of the label.
 76        :param labelWidth: (Optional) Width of the label.
 77        :param helpMessage: (Optional) Adds a help message to the control.
 78        :param preMessage: (Optional) Instructions for interacting with the control.
 79        :param successMessage: (Optional) Message after successful validation.
 80        :param errorMessage: (Optional) Message after validation error.
 81        """
 82        self.type = "datepicker"
 83        self.name = name
 84        self.id = id
 85        self.value = value
 86        self.css = css
 87        self.disabled = disabled
 88        self.editable = editable
 89        self.height = height
 90        self.hidden = hidden
 91        self.padding = padding
 92        self.required = required
 93        self.validation = validation
 94        self.width = width
 95        self.date = date
 96        self.dateFormat = dateFormat
 97        self.disabledDates = disabledDates
 98        self.icon = icon
 99        self.mark = mark
100        self.mode = mode
101        self.placeholder = placeholder
102        self.thisMonthOnly = thisMonthOnly
103        self.timeFormat = timeFormat
104        self.timePicker = timePicker
105        self.valueFormat = valueFormat
106        self.weekNumbers = weekNumbers
107        self.weekStart = weekStart
108        self.hiddenLabel = hiddenLabel
109        self.label = label
110        self.labelPosition = labelPosition
111        self.labelWidth = labelWidth
112        self.helpMessage = helpMessage
113        self.preMessage = preMessage
114        self.successMessage = successMessage
115        self.errorMessage = errorMessage
116
117    def to_dict(self) -> Dict[str, Any]:
118        """
119        Converts the DatePickerConfig into a dictionary format.
120        """
121        config_dict = {
122            'type': self.type,
123            'name': self.name,
124            'id': self.id,
125            'value': self.value,
126            'css': self.css,
127            'disabled': self.disabled,
128            'editable': self.editable,
129            'height': self.height,
130            'hidden': self.hidden,
131            'padding': self.padding,
132            'required': self.required,
133            'validation': self.validation,
134            'width': self.width,
135            'date': self.date,
136            'dateFormat': self.dateFormat,
137            'disabledDates': self.disabledDates,
138            'icon': self.icon,
139            'mark': self.mark,
140            'mode': self.mode,
141            'placeholder': self.placeholder,
142            'thisMonthOnly': self.thisMonthOnly,
143            'timeFormat': self.timeFormat,
144            'timePicker': self.timePicker,
145            'valueFormat': self.valueFormat,
146            'weekNumbers': self.weekNumbers,
147            'weekStart': self.weekStart,
148            'hiddenLabel': self.hiddenLabel,
149            'label': self.label,
150            'labelPosition': self.labelPosition,
151            'labelWidth': self.labelWidth,
152            'helpMessage': self.helpMessage,
153            'preMessage': self.preMessage,
154            'successMessage': self.successMessage,
155            'errorMessage': self.errorMessage
156        }
157        # Remove None values
158        config_dict = {k: v for k, v in config_dict.items() if v is not None}
159
160        # Handle functions
161        if 'validation' in config_dict:
162            config_dict['validation'] = create_proxy(self.validation)
163
164        return config_dict

Configuration class for the DatePicker control.

DatepickerConfig( name: str = None, id: str = None, value: Union[str, Any] = None, css: str = None, disabled: bool = False, editable: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', required: bool = False, validation: Callable[[Any], bool] = None, width: Union[str, int] = 'content', date: Union[str, Any] = None, dateFormat: str = '%d/%m/%y', disabledDates: Any = None, icon: str = None, mark: Any = None, mode: str = 'calendar', placeholder: str = None, thisMonthOnly: bool = False, timeFormat: Union[int, str] = 24, timePicker: bool = False, valueFormat: str = 'string', weekNumbers: bool = False, weekStart: str = 'sunday', hiddenLabel: bool = False, label: str = None, labelPosition: str = 'top', labelWidth: Union[str, int] = None, helpMessage: str = None, preMessage: str = None, successMessage: str = None, errorMessage: str = None)
 11    def __init__(self,
 12                 name: str = None,
 13                 id: str = None,
 14                 value: Union[str, Any] = None,
 15                 css: str = None,
 16                 disabled: bool = False,
 17                 editable: bool = False,
 18                 height: Union[str, int] = "content",
 19                 hidden: bool = False,
 20                 padding: Union[str, int] = "5px",
 21                 required: bool = False,
 22                 validation: Callable[[Any], bool] = None,
 23                 width: Union[str, int] = "content",
 24                 date: Union[str, Any] = None,
 25                 dateFormat: str = "%d/%m/%y",
 26                 disabledDates: Any = None,
 27                 icon: str = None,
 28                 mark: Any = None,
 29                 mode: str = "calendar",
 30                 placeholder: str = None,
 31                 thisMonthOnly: bool = False,
 32                 timeFormat: Union[int, str] = 24,
 33                 timePicker: bool = False,
 34                 valueFormat: str = "string",
 35                 weekNumbers: bool = False,
 36                 weekStart: str = "sunday",
 37                 hiddenLabel: bool = False,
 38                 label: str = None,
 39                 labelPosition: str = "top",
 40                 labelWidth: Union[str, int] = None,
 41                 helpMessage: str = None,
 42                 preMessage: str = None,
 43                 successMessage: str = None,
 44                 errorMessage: str = None):
 45        """
 46        Initializes the DatePickerConfig.
 47
 48        :param name: (Optional) The name of the control.
 49        :param id: (Optional) The id of the control.
 50        :param value: (Optional) The value of the datepicker.
 51        :param css: (Optional) Adds style classes to the control.
 52        :param disabled: (Optional) Whether the control is disabled.
 53        :param editable: (Optional) Allows user to enter the value manually.
 54        :param height: (Optional) The height of the control.
 55        :param hidden: (Optional) Whether the control is hidden.
 56        :param padding: (Optional) Sets padding between the cell and border.
 57        :param required: (Optional) Whether the control is required.
 58        :param validation: (Optional) The validation function.
 59        :param width: (Optional) The width of the control.
 60        :param date: (Optional) The date that will be opened when the calendar is created.
 61        :param dateFormat: (Optional) The format of dates in the calendar.
 62        :param disabledDates: (Optional) Disables some date intervals.
 63        :param icon: (Optional) The CSS class name of an icon.
 64        :param mark: (Optional) Adds a CSS class to specific days.
 65        :param mode: (Optional) Specifies the mode of displaying a calendar.
 66        :param placeholder: (Optional) A tip for the input.
 67        :param thisMonthOnly: (Optional) Hides dates of the previous/next months.
 68        :param timeFormat: (Optional) Time format of a timepicker: 12 or 24.
 69        :param timePicker: (Optional) Adds a timepicker into the calendar.
 70        :param valueFormat: (Optional) Format of the returned value: "string" or "Date".
 71        :param weekNumbers: (Optional) Shows the numbers of weeks.
 72        :param weekStart: (Optional) Starting day of the week.
 73        :param hiddenLabel: (Optional) Makes the label invisible.
 74        :param label: (Optional) Specifies a label for the control.
 75        :param labelPosition: (Optional) Position of the label.
 76        :param labelWidth: (Optional) Width of the label.
 77        :param helpMessage: (Optional) Adds a help message to the control.
 78        :param preMessage: (Optional) Instructions for interacting with the control.
 79        :param successMessage: (Optional) Message after successful validation.
 80        :param errorMessage: (Optional) Message after validation error.
 81        """
 82        self.type = "datepicker"
 83        self.name = name
 84        self.id = id
 85        self.value = value
 86        self.css = css
 87        self.disabled = disabled
 88        self.editable = editable
 89        self.height = height
 90        self.hidden = hidden
 91        self.padding = padding
 92        self.required = required
 93        self.validation = validation
 94        self.width = width
 95        self.date = date
 96        self.dateFormat = dateFormat
 97        self.disabledDates = disabledDates
 98        self.icon = icon
 99        self.mark = mark
100        self.mode = mode
101        self.placeholder = placeholder
102        self.thisMonthOnly = thisMonthOnly
103        self.timeFormat = timeFormat
104        self.timePicker = timePicker
105        self.valueFormat = valueFormat
106        self.weekNumbers = weekNumbers
107        self.weekStart = weekStart
108        self.hiddenLabel = hiddenLabel
109        self.label = label
110        self.labelPosition = labelPosition
111        self.labelWidth = labelWidth
112        self.helpMessage = helpMessage
113        self.preMessage = preMessage
114        self.successMessage = successMessage
115        self.errorMessage = errorMessage

Initializes the DatePickerConfig.

Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • value: (Optional) The value of the datepicker.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • editable: (Optional) Allows user to enter the value manually.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • required: (Optional) Whether the control is required.
  • validation: (Optional) The validation function.
  • width: (Optional) The width of the control.
  • date: (Optional) The date that will be opened when the calendar is created.
  • dateFormat: (Optional) The format of dates in the calendar.
  • disabledDates: (Optional) Disables some date intervals.
  • icon: (Optional) The CSS class name of an icon.
  • mark: (Optional) Adds a CSS class to specific days.
  • mode: (Optional) Specifies the mode of displaying a calendar.
  • placeholder: (Optional) A tip for the input.
  • thisMonthOnly: (Optional) Hides dates of the previous/next months.
  • timeFormat: (Optional) Time format of a timepicker: 12 or 24.
  • timePicker: (Optional) Adds a timepicker into the calendar.
  • valueFormat: (Optional) Format of the returned value: "string" or "Date".
  • weekNumbers: (Optional) Shows the numbers of weeks.
  • weekStart: (Optional) Starting day of the week.
  • hiddenLabel: (Optional) Makes the label invisible.
  • label: (Optional) Specifies a label for the control.
  • labelPosition: (Optional) Position of the label.
  • labelWidth: (Optional) Width of the label.
  • helpMessage: (Optional) Adds a help message to the control.
  • preMessage: (Optional) Instructions for interacting with the control.
  • successMessage: (Optional) Message after successful validation.
  • errorMessage: (Optional) Message after validation error.
type
name
id
value
css
disabled
editable
height
hidden
padding
required
validation
width
date
dateFormat
disabledDates
icon
mark
mode
placeholder
thisMonthOnly
timeFormat
timePicker
valueFormat
weekNumbers
weekStart
hiddenLabel
label
labelPosition
labelWidth
helpMessage
preMessage
successMessage
errorMessage
def to_dict(self) -> Dict[str, Any]:
117    def to_dict(self) -> Dict[str, Any]:
118        """
119        Converts the DatePickerConfig into a dictionary format.
120        """
121        config_dict = {
122            'type': self.type,
123            'name': self.name,
124            'id': self.id,
125            'value': self.value,
126            'css': self.css,
127            'disabled': self.disabled,
128            'editable': self.editable,
129            'height': self.height,
130            'hidden': self.hidden,
131            'padding': self.padding,
132            'required': self.required,
133            'validation': self.validation,
134            'width': self.width,
135            'date': self.date,
136            'dateFormat': self.dateFormat,
137            'disabledDates': self.disabledDates,
138            'icon': self.icon,
139            'mark': self.mark,
140            'mode': self.mode,
141            'placeholder': self.placeholder,
142            'thisMonthOnly': self.thisMonthOnly,
143            'timeFormat': self.timeFormat,
144            'timePicker': self.timePicker,
145            'valueFormat': self.valueFormat,
146            'weekNumbers': self.weekNumbers,
147            'weekStart': self.weekStart,
148            'hiddenLabel': self.hiddenLabel,
149            'label': self.label,
150            'labelPosition': self.labelPosition,
151            'labelWidth': self.labelWidth,
152            'helpMessage': self.helpMessage,
153            'preMessage': self.preMessage,
154            'successMessage': self.successMessage,
155            'errorMessage': self.errorMessage
156        }
157        # Remove None values
158        config_dict = {k: v for k, v in config_dict.items() if v is not None}
159
160        # Handle functions
161        if 'validation' in config_dict:
162            config_dict['validation'] = create_proxy(self.validation)
163
164        return config_dict

Converts the DatePickerConfig into a dictionary format.

class FieldsetConfig:
 6class FieldsetConfig:
 7    """
 8    Configuration class for the Fieldset control.
 9    """
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 hidden: bool = False,
14                 disabled: bool = False,
15                 css: str = None,
16                 width: Union[str, int] = "content",
17                 height: Union[str, int] = "content",
18                 padding: Union[str, int] = "5px",
19                 label: str = None,
20                 labelAlignment: str = "left",
21                 rows: List[Any] = None,
22                 cols: List[Any] = None,
23                 align: str = "start"):
24        """
25        Initializes the FieldsetConfig.
26
27        :param name: (Optional) The name of the control.
28        :param id: (Optional) The id of the control.
29        :param hidden: (Optional) Whether the control is hidden.
30        :param disabled: (Optional) Whether the control is disabled.
31        :param css: (Optional) Adds style classes to the control.
32        :param width: (Optional) The width of the control.
33        :param height: (Optional) The height of the control.
34        :param padding: (Optional) Sets padding for the content inside the control.
35        :param label: (Optional) Specifies a label for the control.
36        :param labelAlignment: (Optional) Position of the label.
37        :param rows: (Optional) Arranges controls vertically.
38        :param cols: (Optional) Arranges controls horizontally.
39        :param align: (Optional) Alignment of controls inside the control.
40        """
41        self.type = "fieldset"
42        self.name = name
43        self.id = id
44        self.hidden = hidden
45        self.disabled = disabled
46        self.css = css
47        self.width = width
48        self.height = height
49        self.padding = padding
50        self.label = label
51        self.labelAlignment = labelAlignment
52        self.rows = rows
53        self.cols = cols
54        self.align = align
55
56    def to_dict(self) -> Dict[str, Any]:
57        """
58        Converts the FieldsetConfig into a dictionary format.
59        """
60        config_dict = {
61            'type': self.type,
62            'name': self.name,
63            'id': self.id,
64            'hidden': self.hidden,
65            'disabled': self.disabled,
66            'css': self.css,
67            'width': self.width,
68            'height': self.height,
69            'padding': self.padding,
70            'label': self.label,
71            'labelAlignment': self.labelAlignment,
72            'rows': self.rows,
73            'cols': self.cols,
74            'align': self.align
75        }
76        # Remove None values
77        return {k: v for k, v in config_dict.items() if v is not None}

Configuration class for the Fieldset control.

FieldsetConfig( name: str = None, id: str = None, hidden: bool = False, disabled: bool = False, css: str = None, width: Union[str, int] = 'content', height: Union[str, int] = 'content', padding: Union[str, int] = '5px', label: str = None, labelAlignment: str = 'left', rows: List[Any] = None, cols: List[Any] = None, align: str = 'start')
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 hidden: bool = False,
14                 disabled: bool = False,
15                 css: str = None,
16                 width: Union[str, int] = "content",
17                 height: Union[str, int] = "content",
18                 padding: Union[str, int] = "5px",
19                 label: str = None,
20                 labelAlignment: str = "left",
21                 rows: List[Any] = None,
22                 cols: List[Any] = None,
23                 align: str = "start"):
24        """
25        Initializes the FieldsetConfig.
26
27        :param name: (Optional) The name of the control.
28        :param id: (Optional) The id of the control.
29        :param hidden: (Optional) Whether the control is hidden.
30        :param disabled: (Optional) Whether the control is disabled.
31        :param css: (Optional) Adds style classes to the control.
32        :param width: (Optional) The width of the control.
33        :param height: (Optional) The height of the control.
34        :param padding: (Optional) Sets padding for the content inside the control.
35        :param label: (Optional) Specifies a label for the control.
36        :param labelAlignment: (Optional) Position of the label.
37        :param rows: (Optional) Arranges controls vertically.
38        :param cols: (Optional) Arranges controls horizontally.
39        :param align: (Optional) Alignment of controls inside the control.
40        """
41        self.type = "fieldset"
42        self.name = name
43        self.id = id
44        self.hidden = hidden
45        self.disabled = disabled
46        self.css = css
47        self.width = width
48        self.height = height
49        self.padding = padding
50        self.label = label
51        self.labelAlignment = labelAlignment
52        self.rows = rows
53        self.cols = cols
54        self.align = align

Initializes the FieldsetConfig.

Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • hidden: (Optional) Whether the control is hidden.
  • disabled: (Optional) Whether the control is disabled.
  • css: (Optional) Adds style classes to the control.
  • width: (Optional) The width of the control.
  • height: (Optional) The height of the control.
  • padding: (Optional) Sets padding for the content inside the control.
  • label: (Optional) Specifies a label for the control.
  • labelAlignment: (Optional) Position of the label.
  • rows: (Optional) Arranges controls vertically.
  • cols: (Optional) Arranges controls horizontally.
  • align: (Optional) Alignment of controls inside the control.
type
name
id
hidden
disabled
css
width
height
padding
label
labelAlignment
rows
cols
align
def to_dict(self) -> Dict[str, Any]:
56    def to_dict(self) -> Dict[str, Any]:
57        """
58        Converts the FieldsetConfig into a dictionary format.
59        """
60        config_dict = {
61            'type': self.type,
62            'name': self.name,
63            'id': self.id,
64            'hidden': self.hidden,
65            'disabled': self.disabled,
66            'css': self.css,
67            'width': self.width,
68            'height': self.height,
69            'padding': self.padding,
70            'label': self.label,
71            'labelAlignment': self.labelAlignment,
72            'rows': self.rows,
73            'cols': self.cols,
74            'align': self.align
75        }
76        # Remove None values
77        return {k: v for k, v in config_dict.items() if v is not None}

Converts the FieldsetConfig into a dictionary format.

class InputConfig:
  7class InputConfig:
  8    """
  9    Configuration class for the Input control.
 10    """
 11    def __init__(self,
 12                 name: str = None,
 13                 id: str = None,
 14                 value: Union[str, int] = None,
 15                 css: str = None,
 16                 disabled: bool = False,
 17                 height: Union[str, int] = "content",
 18                 hidden: bool = False,
 19                 padding: Union[str, int] = "5px",
 20                 required: bool = False,
 21                 validation: Union[str, Callable[[Any], bool]] = None,
 22                 width: Union[str, int] = "content",
 23                 autocomplete: bool = False,
 24                 icon: str = None,
 25                 inputType: str = "input",
 26                 max: Union[int, None] = None,
 27                 maxlength: Union[int, None] = None,
 28                 min: Union[int, None] = None,
 29                 minlength: Union[int, None] = None,
 30                 placeholder: str = None,
 31                 readOnly: bool = False,
 32                 hiddenLabel: bool = False,
 33                 label: str = None,
 34                 labelPosition: str = "top",
 35                 labelWidth: Union[str, int] = None,
 36                 helpMessage: str = None,
 37                 preMessage: str = None,
 38                 successMessage: str = None,
 39                 errorMessage: str = None):
 40        """
 41        Initializes the InputConfig.
 42
 43        :param name: (Optional) The name of the control.
 44        :param id: (Optional) The id of the control.
 45        :param value: (Optional) The initial value of the input.
 46        :param css: (Optional) Adds style classes to the control.
 47        :param disabled: (Optional) Whether the control is disabled.
 48        :param height: (Optional) The height of the control.
 49        :param hidden: (Optional) Whether the control is hidden.
 50        :param padding: (Optional) Sets padding between the cell and border.
 51        :param required: (Optional) Whether the control is required.
 52        :param validation: (Optional) The validation rule or function.
 53        :param width: (Optional) The width of the control.
 54        :param autocomplete: (Optional) Enables autocomplete functionality.
 55        :param icon: (Optional) The CSS class name of an icon.
 56        :param inputType: (Optional) Sets the type of input: "text", "password", "number".
 57        :param max: (Optional) The maximal value allowed in the input (for "number" type).
 58        :param maxlength: (Optional) The maximum number of characters allowed.
 59        :param min: (Optional) The minimal value allowed in the input (for "number" type).
 60        :param minlength: (Optional) The minimum number of characters allowed.
 61        :param placeholder: (Optional) A tip for the input.
 62        :param readOnly: (Optional) Whether the input is readonly.
 63        :param hiddenLabel: (Optional) Makes the label invisible.
 64        :param label: (Optional) Specifies a label for the control.
 65        :param labelPosition: (Optional) Position of the label.
 66        :param labelWidth: (Optional) Width of the label.
 67        :param helpMessage: (Optional) Adds a help message to the control.
 68        :param preMessage: (Optional) Instructions for interacting with the control.
 69        :param successMessage: (Optional) Message after successful validation.
 70        :param errorMessage: (Optional) Message after validation error.
 71        """
 72        self.name = name
 73        self.id = id
 74        self.value = value
 75        self.css = css
 76        self.disabled = disabled
 77        self.height = height
 78        self.hidden = hidden
 79        self.padding = padding
 80        self.required = required
 81        self.validation = validation
 82        self.width = width
 83        self.autocomplete = autocomplete
 84        self.icon = icon
 85        self.inputType = inputType
 86        self.max = max
 87        self.maxlength = maxlength
 88        self.min = min
 89        self.minlength = minlength
 90        self.placeholder = placeholder
 91        self.readOnly = readOnly
 92        self.hiddenLabel = hiddenLabel
 93        self.label = label
 94        self.labelPosition = labelPosition
 95        self.labelWidth = labelWidth
 96        self.helpMessage = helpMessage
 97        self.preMessage = preMessage
 98        self.successMessage = successMessage
 99        self.errorMessage = errorMessage
100
101    def to_dict(self) -> Dict[str, Any]:
102        """
103        Converts the InputConfig into a dictionary format.
104        """
105        config_dict = {
106            'name': self.name,
107            'id': self.id,
108            'value': self.value,
109            'css': self.css,
110            'disabled': self.disabled,
111            'height': self.height,
112            'hidden': self.hidden,
113            'padding': self.padding,
114            'required': self.required,
115            'validation': self.validation,
116            'width': self.width,
117            'autocomplete': self.autocomplete,
118            'icon': self.icon,
119            'type': self.inputType,
120            'max': self.max,
121            'maxlength': self.maxlength,
122            'min': self.min,
123            'minlength': self.minlength,
124            'placeholder': self.placeholder,
125            'readOnly': self.readOnly,
126            'hiddenLabel': self.hiddenLabel,
127            'label': self.label,
128            'labelPosition': self.labelPosition,
129            'labelWidth': self.labelWidth,
130            'helpMessage': self.helpMessage,
131            'preMessage': self.preMessage,
132            'successMessage': self.successMessage,
133            'errorMessage': self.errorMessage
134        }
135        # Remove None values
136        config_dict = {k: v for k, v in config_dict.items() if v is not None}
137
138        # Handle validation function
139        if 'validation' in config_dict and callable(config_dict['validation']):
140            config_dict['validation'] = create_proxy(self.validation)
141    
142
143        return config_dict

Configuration class for the Input control.

InputConfig( name: str = None, id: str = None, value: Union[str, int] = None, css: str = None, disabled: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', required: bool = False, validation: Union[str, Callable[[Any], bool]] = None, width: Union[str, int] = 'content', autocomplete: bool = False, icon: str = None, inputType: str = 'input', max: Optional[int] = None, maxlength: Optional[int] = None, min: Optional[int] = None, minlength: Optional[int] = None, placeholder: str = None, readOnly: bool = False, hiddenLabel: bool = False, label: str = None, labelPosition: str = 'top', labelWidth: Union[str, int] = None, helpMessage: str = None, preMessage: str = None, successMessage: str = None, errorMessage: str = None)
11    def __init__(self,
12                 name: str = None,
13                 id: str = None,
14                 value: Union[str, int] = None,
15                 css: str = None,
16                 disabled: bool = False,
17                 height: Union[str, int] = "content",
18                 hidden: bool = False,
19                 padding: Union[str, int] = "5px",
20                 required: bool = False,
21                 validation: Union[str, Callable[[Any], bool]] = None,
22                 width: Union[str, int] = "content",
23                 autocomplete: bool = False,
24                 icon: str = None,
25                 inputType: str = "input",
26                 max: Union[int, None] = None,
27                 maxlength: Union[int, None] = None,
28                 min: Union[int, None] = None,
29                 minlength: Union[int, None] = None,
30                 placeholder: str = None,
31                 readOnly: bool = False,
32                 hiddenLabel: bool = False,
33                 label: str = None,
34                 labelPosition: str = "top",
35                 labelWidth: Union[str, int] = None,
36                 helpMessage: str = None,
37                 preMessage: str = None,
38                 successMessage: str = None,
39                 errorMessage: str = None):
40        """
41        Initializes the InputConfig.
42
43        :param name: (Optional) The name of the control.
44        :param id: (Optional) The id of the control.
45        :param value: (Optional) The initial value of the input.
46        :param css: (Optional) Adds style classes to the control.
47        :param disabled: (Optional) Whether the control is disabled.
48        :param height: (Optional) The height of the control.
49        :param hidden: (Optional) Whether the control is hidden.
50        :param padding: (Optional) Sets padding between the cell and border.
51        :param required: (Optional) Whether the control is required.
52        :param validation: (Optional) The validation rule or function.
53        :param width: (Optional) The width of the control.
54        :param autocomplete: (Optional) Enables autocomplete functionality.
55        :param icon: (Optional) The CSS class name of an icon.
56        :param inputType: (Optional) Sets the type of input: "text", "password", "number".
57        :param max: (Optional) The maximal value allowed in the input (for "number" type).
58        :param maxlength: (Optional) The maximum number of characters allowed.
59        :param min: (Optional) The minimal value allowed in the input (for "number" type).
60        :param minlength: (Optional) The minimum number of characters allowed.
61        :param placeholder: (Optional) A tip for the input.
62        :param readOnly: (Optional) Whether the input is readonly.
63        :param hiddenLabel: (Optional) Makes the label invisible.
64        :param label: (Optional) Specifies a label for the control.
65        :param labelPosition: (Optional) Position of the label.
66        :param labelWidth: (Optional) Width of the label.
67        :param helpMessage: (Optional) Adds a help message to the control.
68        :param preMessage: (Optional) Instructions for interacting with the control.
69        :param successMessage: (Optional) Message after successful validation.
70        :param errorMessage: (Optional) Message after validation error.
71        """
72        self.name = name
73        self.id = id
74        self.value = value
75        self.css = css
76        self.disabled = disabled
77        self.height = height
78        self.hidden = hidden
79        self.padding = padding
80        self.required = required
81        self.validation = validation
82        self.width = width
83        self.autocomplete = autocomplete
84        self.icon = icon
85        self.inputType = inputType
86        self.max = max
87        self.maxlength = maxlength
88        self.min = min
89        self.minlength = minlength
90        self.placeholder = placeholder
91        self.readOnly = readOnly
92        self.hiddenLabel = hiddenLabel
93        self.label = label
94        self.labelPosition = labelPosition
95        self.labelWidth = labelWidth
96        self.helpMessage = helpMessage
97        self.preMessage = preMessage
98        self.successMessage = successMessage
99        self.errorMessage = errorMessage

Initializes the InputConfig.

Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • value: (Optional) The initial value of the input.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • required: (Optional) Whether the control is required.
  • validation: (Optional) The validation rule or function.
  • width: (Optional) The width of the control.
  • autocomplete: (Optional) Enables autocomplete functionality.
  • icon: (Optional) The CSS class name of an icon.
  • inputType: (Optional) Sets the type of input: "text", "password", "number".
  • max: (Optional) The maximal value allowed in the input (for "number" type).
  • maxlength: (Optional) The maximum number of characters allowed.
  • min: (Optional) The minimal value allowed in the input (for "number" type).
  • minlength: (Optional) The minimum number of characters allowed.
  • placeholder: (Optional) A tip for the input.
  • readOnly: (Optional) Whether the input is readonly.
  • hiddenLabel: (Optional) Makes the label invisible.
  • label: (Optional) Specifies a label for the control.
  • labelPosition: (Optional) Position of the label.
  • labelWidth: (Optional) Width of the label.
  • helpMessage: (Optional) Adds a help message to the control.
  • preMessage: (Optional) Instructions for interacting with the control.
  • successMessage: (Optional) Message after successful validation.
  • errorMessage: (Optional) Message after validation error.
name
id
value
css
disabled
height
hidden
padding
required
validation
width
autocomplete
icon
inputType
max
maxlength
min
minlength
placeholder
readOnly
hiddenLabel
label
labelPosition
labelWidth
helpMessage
preMessage
successMessage
errorMessage
def to_dict(self) -> Dict[str, Any]:
101    def to_dict(self) -> Dict[str, Any]:
102        """
103        Converts the InputConfig into a dictionary format.
104        """
105        config_dict = {
106            'name': self.name,
107            'id': self.id,
108            'value': self.value,
109            'css': self.css,
110            'disabled': self.disabled,
111            'height': self.height,
112            'hidden': self.hidden,
113            'padding': self.padding,
114            'required': self.required,
115            'validation': self.validation,
116            'width': self.width,
117            'autocomplete': self.autocomplete,
118            'icon': self.icon,
119            'type': self.inputType,
120            'max': self.max,
121            'maxlength': self.maxlength,
122            'min': self.min,
123            'minlength': self.minlength,
124            'placeholder': self.placeholder,
125            'readOnly': self.readOnly,
126            'hiddenLabel': self.hiddenLabel,
127            'label': self.label,
128            'labelPosition': self.labelPosition,
129            'labelWidth': self.labelWidth,
130            'helpMessage': self.helpMessage,
131            'preMessage': self.preMessage,
132            'successMessage': self.successMessage,
133            'errorMessage': self.errorMessage
134        }
135        # Remove None values
136        config_dict = {k: v for k, v in config_dict.items() if v is not None}
137
138        # Handle validation function
139        if 'validation' in config_dict and callable(config_dict['validation']):
140            config_dict['validation'] = create_proxy(self.validation)
141    
142
143        return config_dict

Converts the InputConfig into a dictionary format.

class RadioGroupConfig:
 51class RadioGroupConfig:
 52    """
 53    Configuration class for the RadioGroup control.
 54    """
 55    def __init__(self,
 56                 name: str = None,
 57                 id: str = None,
 58                 options: List[RadioButtonOption] = None,
 59                 value: str = None,
 60                 css: str = None,
 61                 disabled: bool = False,
 62                 height: Union[str, int] = "content",
 63                 hidden: bool = False,
 64                 padding: Union[str, int] = "5px",
 65                 required: bool = False,
 66                 width: Union[str, int] = "content",
 67                 hiddenLabel: bool = False,
 68                 label: str = None,
 69                 labelPosition: str = "top",
 70                 labelWidth: Union[str, int] = None,
 71                 helpMessage: str = None,
 72                 preMessage: str = None,
 73                 successMessage: str = None,
 74                 errorMessage: str = None):
 75        """
 76        Initializes the RadioGroupConfig.
 77
 78        :param name: (Optional) The name of the control.
 79        :param id: (Optional) The id of the control.
 80        :param options: (Required) An object with options of a RadioGroup.
 81        :param value: (Optional) The initial value of the RadioGroup.
 82        :param css: (Optional) Adds style classes to the control.
 83        :param disabled: (Optional) Whether the control is disabled.
 84        :param height: (Optional) The height of the control.
 85        :param hidden: (Optional) Whether the control is hidden.
 86        :param padding: (Optional) Sets padding between the cell and border.
 87        :param required: (Optional) Whether the control is required.
 88        :param width: (Optional) The width of the control.
 89        :param hiddenLabel: (Optional) Makes the label invisible.
 90        :param label: (Optional) Specifies a label for the control.
 91        :param labelPosition: (Optional) Position of the label.
 92        :param labelWidth: (Optional) Width of the label.
 93        :param helpMessage: (Optional) Adds a help message to the control.
 94        :param preMessage: (Optional) Instructions for interacting with the control.
 95        :param successMessage: (Optional) Message after successful validation.
 96        :param errorMessage: (Optional) Message after validation error.
 97        """
 98        self.type = "radioGroup"
 99        self.name = name
100        self.id = id
101        self.options = options  # Should be a list of RadioButtonOption
102        self.value = value
103        self.css = css
104        self.disabled = disabled
105        self.height = height
106        self.hidden = hidden
107        self.padding = padding
108        self.required = required
109        self.width = width
110        self.hiddenLabel = hiddenLabel
111        self.label = label
112        self.labelPosition = labelPosition
113        self.labelWidth = labelWidth
114        self.helpMessage = helpMessage
115        self.preMessage = preMessage
116        self.successMessage = successMessage
117        self.errorMessage = errorMessage
118
119    def to_dict(self) -> Dict[str, Any]:
120        """
121        Converts the RadioGroupConfig into a dictionary format.
122        """
123        def process_option(option):
124            if hasattr(option, 'to_dict'):
125                return option.to_dict()
126            return option
127
128        config_dict = {
129            'type': self.type,
130            'name': self.name,
131            'id': self.id,
132            'options': self.options,
133            'value': self.value,
134            'css': self.css,
135            'disabled': self.disabled,
136            'height': self.height,
137            'hidden': self.hidden,
138            'padding': self.padding,
139            'required': self.required,
140            'width': self.width,
141            'hiddenLabel': self.hiddenLabel,
142            'label': self.label,
143            'labelPosition': self.labelPosition,
144            'labelWidth': self.labelWidth,
145            'helpMessage': self.helpMessage,
146            'preMessage': self.preMessage,
147            'successMessage': self.successMessage,
148            'errorMessage': self.errorMessage
149        }
150
151        # Remove None values
152        return {k: v for k, v in config_dict.items() if v is not None}

Configuration class for the RadioGroup control.

RadioGroupConfig( name: str = None, id: str = None, options: List[dhxpyt.form.controls.radiogroup_config.RadioButtonOption] = None, value: str = None, css: str = None, disabled: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', required: bool = False, width: Union[str, int] = 'content', hiddenLabel: bool = False, label: str = None, labelPosition: str = 'top', labelWidth: Union[str, int] = None, helpMessage: str = None, preMessage: str = None, successMessage: str = None, errorMessage: str = None)
 55    def __init__(self,
 56                 name: str = None,
 57                 id: str = None,
 58                 options: List[RadioButtonOption] = None,
 59                 value: str = None,
 60                 css: str = None,
 61                 disabled: bool = False,
 62                 height: Union[str, int] = "content",
 63                 hidden: bool = False,
 64                 padding: Union[str, int] = "5px",
 65                 required: bool = False,
 66                 width: Union[str, int] = "content",
 67                 hiddenLabel: bool = False,
 68                 label: str = None,
 69                 labelPosition: str = "top",
 70                 labelWidth: Union[str, int] = None,
 71                 helpMessage: str = None,
 72                 preMessage: str = None,
 73                 successMessage: str = None,
 74                 errorMessage: str = None):
 75        """
 76        Initializes the RadioGroupConfig.
 77
 78        :param name: (Optional) The name of the control.
 79        :param id: (Optional) The id of the control.
 80        :param options: (Required) An object with options of a RadioGroup.
 81        :param value: (Optional) The initial value of the RadioGroup.
 82        :param css: (Optional) Adds style classes to the control.
 83        :param disabled: (Optional) Whether the control is disabled.
 84        :param height: (Optional) The height of the control.
 85        :param hidden: (Optional) Whether the control is hidden.
 86        :param padding: (Optional) Sets padding between the cell and border.
 87        :param required: (Optional) Whether the control is required.
 88        :param width: (Optional) The width of the control.
 89        :param hiddenLabel: (Optional) Makes the label invisible.
 90        :param label: (Optional) Specifies a label for the control.
 91        :param labelPosition: (Optional) Position of the label.
 92        :param labelWidth: (Optional) Width of the label.
 93        :param helpMessage: (Optional) Adds a help message to the control.
 94        :param preMessage: (Optional) Instructions for interacting with the control.
 95        :param successMessage: (Optional) Message after successful validation.
 96        :param errorMessage: (Optional) Message after validation error.
 97        """
 98        self.type = "radioGroup"
 99        self.name = name
100        self.id = id
101        self.options = options  # Should be a list of RadioButtonOption
102        self.value = value
103        self.css = css
104        self.disabled = disabled
105        self.height = height
106        self.hidden = hidden
107        self.padding = padding
108        self.required = required
109        self.width = width
110        self.hiddenLabel = hiddenLabel
111        self.label = label
112        self.labelPosition = labelPosition
113        self.labelWidth = labelWidth
114        self.helpMessage = helpMessage
115        self.preMessage = preMessage
116        self.successMessage = successMessage
117        self.errorMessage = errorMessage

Initializes the RadioGroupConfig.

Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • options: (Required) An object with options of a RadioGroup.
  • value: (Optional) The initial value of the RadioGroup.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • required: (Optional) Whether the control is required.
  • width: (Optional) The width of the control.
  • hiddenLabel: (Optional) Makes the label invisible.
  • label: (Optional) Specifies a label for the control.
  • labelPosition: (Optional) Position of the label.
  • labelWidth: (Optional) Width of the label.
  • helpMessage: (Optional) Adds a help message to the control.
  • preMessage: (Optional) Instructions for interacting with the control.
  • successMessage: (Optional) Message after successful validation.
  • errorMessage: (Optional) Message after validation error.
type
name
id
options
value
css
disabled
height
hidden
padding
required
width
hiddenLabel
label
labelPosition
labelWidth
helpMessage
preMessage
successMessage
errorMessage
def to_dict(self) -> Dict[str, Any]:
119    def to_dict(self) -> Dict[str, Any]:
120        """
121        Converts the RadioGroupConfig into a dictionary format.
122        """
123        def process_option(option):
124            if hasattr(option, 'to_dict'):
125                return option.to_dict()
126            return option
127
128        config_dict = {
129            'type': self.type,
130            'name': self.name,
131            'id': self.id,
132            'options': self.options,
133            'value': self.value,
134            'css': self.css,
135            'disabled': self.disabled,
136            'height': self.height,
137            'hidden': self.hidden,
138            'padding': self.padding,
139            'required': self.required,
140            'width': self.width,
141            'hiddenLabel': self.hiddenLabel,
142            'label': self.label,
143            'labelPosition': self.labelPosition,
144            'labelWidth': self.labelWidth,
145            'helpMessage': self.helpMessage,
146            'preMessage': self.preMessage,
147            'successMessage': self.successMessage,
148            'errorMessage': self.errorMessage
149        }
150
151        # Remove None values
152        return {k: v for k, v in config_dict.items() if v is not None}

Converts the RadioGroupConfig into a dictionary format.

class SelectConfig:
 29class SelectConfig:
 30    """
 31    Configuration class for the Select control.
 32    """
 33    def __init__(self,
 34                 name: str = None,
 35                 id: str = None,
 36                 options: List[SelectOption] = None,
 37                 value: Union[str, int] = None,
 38                 css: str = None,
 39                 disabled: bool = False,
 40                 height: Union[str, int] = "content",
 41                 hidden: bool = False,
 42                 padding: Union[str, int] = "5px",
 43                 required: bool = False,
 44                 validation: Callable[[Any], bool] = None,
 45                 width: Union[str, int] = "content",
 46                 icon: str = None,
 47                 hiddenLabel: bool = False,
 48                 label: str = None,
 49                 labelPosition: str = "top",
 50                 labelWidth: Union[str, int] = None,
 51                 helpMessage: str = None,
 52                 preMessage: str = None,
 53                 successMessage: str = None,
 54                 errorMessage: str = None):
 55        """
 56        Initializes the SelectConfig.
 57
 58        :param name: (Optional) The name of the control.
 59        :param id: (Optional) The id of the control.
 60        :param options: (Required) An array of Select options.
 61        :param value: (Optional) The initial value of the select control.
 62        :param css: (Optional) Adds style classes to the control.
 63        :param disabled: (Optional) Whether the control is disabled.
 64        :param height: (Optional) The height of the control.
 65        :param hidden: (Optional) Whether the control is hidden.
 66        :param padding: (Optional) Sets padding between the cell and border.
 67        :param required: (Optional) Whether the control is required.
 68        :param validation: (Optional) The validation function.
 69        :param width: (Optional) The width of the control.
 70        :param icon: (Optional) The CSS class name of an icon.
 71        :param hiddenLabel: (Optional) Makes the label invisible.
 72        :param label: (Optional) Specifies a label for the control.
 73        :param labelPosition: (Optional) Position of the label.
 74        :param labelWidth: (Optional) Width of the label.
 75        :param helpMessage: (Optional) Adds a help message to the control.
 76        :param preMessage: (Optional) Instructions for interacting with the control.
 77        :param successMessage: (Optional) Message after successful validation.
 78        :param errorMessage: (Optional) Message after validation error.
 79        """
 80        self.type = "select"
 81        self.name = name
 82        self.id = id
 83        self.options = options  # Should be a list of SelectOption
 84        self.value = value
 85        self.css = css
 86        self.disabled = disabled
 87        self.height = height
 88        self.hidden = hidden
 89        self.padding = padding
 90        self.required = required
 91        self.validation = validation
 92        self.width = width
 93        self.icon = icon
 94        self.hiddenLabel = hiddenLabel
 95        self.label = label
 96        self.labelPosition = labelPosition
 97        self.labelWidth = labelWidth
 98        self.helpMessage = helpMessage
 99        self.preMessage = preMessage
100        self.successMessage = successMessage
101        self.errorMessage = errorMessage
102
103    def to_dict(self) -> Dict[str, Any]:
104        """
105        Converts the SelectConfig into a dictionary format.
106        """
107        config_dict = {
108            'type': self.type,
109            'name': self.name,
110            'id': self.id,
111            'options': [option.to_dict() for option in self.options] if self.options else None,
112            'value': self.value,
113            'css': self.css,
114            'disabled': self.disabled,
115            'height': self.height,
116            'hidden': self.hidden,
117            'padding': self.padding,
118            'required': self.required,
119            'validation': self.validation,
120            'width': self.width,
121            'icon': self.icon,
122            'hiddenLabel': self.hiddenLabel,
123            'label': self.label,
124            'labelPosition': self.labelPosition,
125            'labelWidth': self.labelWidth,
126            'helpMessage': self.helpMessage,
127            'preMessage': self.preMessage,
128            'successMessage': self.successMessage,
129            'errorMessage': self.errorMessage
130        }
131        # Remove None values
132        config_dict = {k: v for k, v in config_dict.items() if v is not None}
133
134        # Handle validation function
135        if 'validation' in config_dict and callable(config_dict['validation']):
136            config_dict['validation'] = create_proxy(self.validation)
137
138        return config_dict

Configuration class for the Select control.

SelectConfig( name: str = None, id: str = None, options: List[dhxpyt.form.controls.select_config.SelectOption] = None, value: Union[str, int] = None, css: str = None, disabled: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', required: bool = False, validation: Callable[[Any], bool] = None, width: Union[str, int] = 'content', icon: str = None, hiddenLabel: bool = False, label: str = None, labelPosition: str = 'top', labelWidth: Union[str, int] = None, helpMessage: str = None, preMessage: str = None, successMessage: str = None, errorMessage: str = None)
 33    def __init__(self,
 34                 name: str = None,
 35                 id: str = None,
 36                 options: List[SelectOption] = None,
 37                 value: Union[str, int] = None,
 38                 css: str = None,
 39                 disabled: bool = False,
 40                 height: Union[str, int] = "content",
 41                 hidden: bool = False,
 42                 padding: Union[str, int] = "5px",
 43                 required: bool = False,
 44                 validation: Callable[[Any], bool] = None,
 45                 width: Union[str, int] = "content",
 46                 icon: str = None,
 47                 hiddenLabel: bool = False,
 48                 label: str = None,
 49                 labelPosition: str = "top",
 50                 labelWidth: Union[str, int] = None,
 51                 helpMessage: str = None,
 52                 preMessage: str = None,
 53                 successMessage: str = None,
 54                 errorMessage: str = None):
 55        """
 56        Initializes the SelectConfig.
 57
 58        :param name: (Optional) The name of the control.
 59        :param id: (Optional) The id of the control.
 60        :param options: (Required) An array of Select options.
 61        :param value: (Optional) The initial value of the select control.
 62        :param css: (Optional) Adds style classes to the control.
 63        :param disabled: (Optional) Whether the control is disabled.
 64        :param height: (Optional) The height of the control.
 65        :param hidden: (Optional) Whether the control is hidden.
 66        :param padding: (Optional) Sets padding between the cell and border.
 67        :param required: (Optional) Whether the control is required.
 68        :param validation: (Optional) The validation function.
 69        :param width: (Optional) The width of the control.
 70        :param icon: (Optional) The CSS class name of an icon.
 71        :param hiddenLabel: (Optional) Makes the label invisible.
 72        :param label: (Optional) Specifies a label for the control.
 73        :param labelPosition: (Optional) Position of the label.
 74        :param labelWidth: (Optional) Width of the label.
 75        :param helpMessage: (Optional) Adds a help message to the control.
 76        :param preMessage: (Optional) Instructions for interacting with the control.
 77        :param successMessage: (Optional) Message after successful validation.
 78        :param errorMessage: (Optional) Message after validation error.
 79        """
 80        self.type = "select"
 81        self.name = name
 82        self.id = id
 83        self.options = options  # Should be a list of SelectOption
 84        self.value = value
 85        self.css = css
 86        self.disabled = disabled
 87        self.height = height
 88        self.hidden = hidden
 89        self.padding = padding
 90        self.required = required
 91        self.validation = validation
 92        self.width = width
 93        self.icon = icon
 94        self.hiddenLabel = hiddenLabel
 95        self.label = label
 96        self.labelPosition = labelPosition
 97        self.labelWidth = labelWidth
 98        self.helpMessage = helpMessage
 99        self.preMessage = preMessage
100        self.successMessage = successMessage
101        self.errorMessage = errorMessage

Initializes the SelectConfig.

Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • options: (Required) An array of Select options.
  • value: (Optional) The initial value of the select control.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • required: (Optional) Whether the control is required.
  • validation: (Optional) The validation function.
  • width: (Optional) The width of the control.
  • icon: (Optional) The CSS class name of an icon.
  • hiddenLabel: (Optional) Makes the label invisible.
  • label: (Optional) Specifies a label for the control.
  • labelPosition: (Optional) Position of the label.
  • labelWidth: (Optional) Width of the label.
  • helpMessage: (Optional) Adds a help message to the control.
  • preMessage: (Optional) Instructions for interacting with the control.
  • successMessage: (Optional) Message after successful validation.
  • errorMessage: (Optional) Message after validation error.
type
name
id
options
value
css
disabled
height
hidden
padding
required
validation
width
icon
hiddenLabel
label
labelPosition
labelWidth
helpMessage
preMessage
successMessage
errorMessage
def to_dict(self) -> Dict[str, Any]:
103    def to_dict(self) -> Dict[str, Any]:
104        """
105        Converts the SelectConfig into a dictionary format.
106        """
107        config_dict = {
108            'type': self.type,
109            'name': self.name,
110            'id': self.id,
111            'options': [option.to_dict() for option in self.options] if self.options else None,
112            'value': self.value,
113            'css': self.css,
114            'disabled': self.disabled,
115            'height': self.height,
116            'hidden': self.hidden,
117            'padding': self.padding,
118            'required': self.required,
119            'validation': self.validation,
120            'width': self.width,
121            'icon': self.icon,
122            'hiddenLabel': self.hiddenLabel,
123            'label': self.label,
124            'labelPosition': self.labelPosition,
125            'labelWidth': self.labelWidth,
126            'helpMessage': self.helpMessage,
127            'preMessage': self.preMessage,
128            'successMessage': self.successMessage,
129            'errorMessage': self.errorMessage
130        }
131        # Remove None values
132        config_dict = {k: v for k, v in config_dict.items() if v is not None}
133
134        # Handle validation function
135        if 'validation' in config_dict and callable(config_dict['validation']):
136            config_dict['validation'] = create_proxy(self.validation)
137
138        return config_dict

Converts the SelectConfig into a dictionary format.

class SimpleVaultConfig:
  7class SimpleVaultConfig:
  8    """
  9    Configuration class for the SimpleVault control.
 10    """
 11    def __init__(self,
 12                 name: str = None,
 13                 id: str = None,
 14                 target: str = None,
 15                 value: List[Dict[str, Any]] = None,
 16                 css: str = None,
 17                 height: Union[str, int] = "content",
 18                 width: Union[str, int] = "content",
 19                 padding: Union[str, int] = "5px",
 20                 hidden: bool = False,
 21                 disabled: bool = False,
 22                 fieldName: str = "file",
 23                 params: Dict[str, Any] = None,
 24                 headerParams: Dict[str, Any] = None,
 25                 singleRequest: bool = False,
 26                 updateFromResponse: bool = True,
 27                 autosend: bool = False,
 28                 accept: str = None,
 29                 validation: Callable[[Any], bool] = None,
 30                 required: bool = False,
 31                 hiddenLabel: bool = False,
 32                 label: str = None,
 33                 labelPosition: str = "top",
 34                 labelWidth: Union[str, int] = None,
 35                 helpMessage: str = None,
 36                 preMessage: str = None,
 37                 successMessage: str = None,
 38                 errorMessage: str = None):
 39        """
 40        Initializes the SimpleVaultConfig.
 41
 42        :param name: (Optional) The name of the control.
 43        :param id: (Optional) The id of the control.
 44        :param target: (Optional) URL to the server-side script that will process file upload.
 45        :param value: (Optional) The default list of loaded files.
 46        :param css: (Optional) Adds style classes to the control.
 47        :param height: (Optional) The height of the control.
 48        :param width: (Optional) The width of the control.
 49        :param padding: (Optional) Sets padding between the cell and border.
 50        :param hidden: (Optional) Whether the control is hidden.
 51        :param disabled: (Optional) Whether the control is disabled.
 52        :param fieldName: (Optional) Name of the file field in the form data.
 53        :param params: (Optional) Extra parameters for sending XMLHttpRequest.
 54        :param headerParams: (Optional) Additional parameters for Request Headers.
 55        :param singleRequest: (Optional) Whether files are sent in one request.
 56        :param updateFromResponse: (Optional) Updates file attributes from server response.
 57        :param autosend: (Optional) Enables automatic sending of an added file.
 58        :param accept: (Optional) Specifies the type/extension displayed in the dialog.
 59        :param validation: (Optional) The validation function.
 60        :param required: (Optional) Whether the control is required.
 61        :param hiddenLabel: (Optional) Makes the label invisible.
 62        :param label: (Optional) Specifies a label for the control.
 63        :param labelPosition: (Optional) Position of the label.
 64        :param labelWidth: (Optional) Width of the label.
 65        :param helpMessage: (Optional) Adds a help message to the control.
 66        :param preMessage: (Optional) Instructions for interacting with the control.
 67        :param successMessage: (Optional) Message after successful validation.
 68        :param errorMessage: (Optional) Message after validation error.
 69        """
 70        self.type = "simpleVault"
 71        self.name = name
 72        self.id = id
 73        self.target = target
 74        self.value = value
 75        self.css = css
 76        self.height = height
 77        self.width = width
 78        self.padding = padding
 79        self.hidden = hidden
 80        self.disabled = disabled
 81        self.fieldName = fieldName
 82        self.params = params
 83        self.headerParams = headerParams
 84        self.singleRequest = singleRequest
 85        self.updateFromResponse = updateFromResponse
 86        self.autosend = autosend
 87        self.accept = accept
 88        self.validation = validation
 89        self.required = required
 90        self.hiddenLabel = hiddenLabel
 91        self.label = label
 92        self.labelPosition = labelPosition
 93        self.labelWidth = labelWidth
 94        self.helpMessage = helpMessage
 95        self.preMessage = preMessage
 96        self.successMessage = successMessage
 97        self.errorMessage = errorMessage
 98
 99    def to_dict(self) -> Dict[str, Any]:
100        """
101        Converts the SimpleVaultConfig into a dictionary format.
102        """
103        config_dict = {
104            'type': self.type,
105            'name': self.name,
106            'id': self.id,
107            'target': self.target,
108            'value': self.value,
109            'css': self.css,
110            'height': self.height,
111            'width': self.width,
112            'padding': self.padding,
113            'hidden': self.hidden,
114            'disabled': self.disabled,
115            'fieldName': self.fieldName,
116            'params': self.params,
117            'headerParams': self.headerParams,
118            'singleRequest': self.singleRequest,
119            'updateFromResponse': self.updateFromResponse,
120            'autosend': self.autosend,
121            'accept': self.accept,
122            'validation': self.validation,
123            'required': self.required,
124            'hiddenLabel': self.hiddenLabel,
125            'label': self.label,
126            'labelPosition': self.labelPosition,
127            'labelWidth': self.labelWidth,
128            'helpMessage': self.helpMessage,
129            'preMessage': self.preMessage,
130            'successMessage': self.successMessage,
131            'errorMessage': self.errorMessage
132        }
133        # Remove None values
134        config_dict = {k: v for k, v in config_dict.items() if v is not None}
135
136        # Handle validation function
137        if 'validation' in config_dict and callable(config_dict['validation']):
138            config_dict['validation'] = create_proxy(self.validation)
139
140        return config_dict

Configuration class for the SimpleVault control.

SimpleVaultConfig( name: str = None, id: str = None, target: str = None, value: List[Dict[str, Any]] = None, css: str = None, height: Union[str, int] = 'content', width: Union[str, int] = 'content', padding: Union[str, int] = '5px', hidden: bool = False, disabled: bool = False, fieldName: str = 'file', params: Dict[str, Any] = None, headerParams: Dict[str, Any] = None, singleRequest: bool = False, updateFromResponse: bool = True, autosend: bool = False, accept: str = None, validation: Callable[[Any], bool] = None, required: bool = False, hiddenLabel: bool = False, label: str = None, labelPosition: str = 'top', labelWidth: Union[str, int] = None, helpMessage: str = None, preMessage: str = None, successMessage: str = None, errorMessage: str = None)
11    def __init__(self,
12                 name: str = None,
13                 id: str = None,
14                 target: str = None,
15                 value: List[Dict[str, Any]] = None,
16                 css: str = None,
17                 height: Union[str, int] = "content",
18                 width: Union[str, int] = "content",
19                 padding: Union[str, int] = "5px",
20                 hidden: bool = False,
21                 disabled: bool = False,
22                 fieldName: str = "file",
23                 params: Dict[str, Any] = None,
24                 headerParams: Dict[str, Any] = None,
25                 singleRequest: bool = False,
26                 updateFromResponse: bool = True,
27                 autosend: bool = False,
28                 accept: str = None,
29                 validation: Callable[[Any], bool] = None,
30                 required: bool = False,
31                 hiddenLabel: bool = False,
32                 label: str = None,
33                 labelPosition: str = "top",
34                 labelWidth: Union[str, int] = None,
35                 helpMessage: str = None,
36                 preMessage: str = None,
37                 successMessage: str = None,
38                 errorMessage: str = None):
39        """
40        Initializes the SimpleVaultConfig.
41
42        :param name: (Optional) The name of the control.
43        :param id: (Optional) The id of the control.
44        :param target: (Optional) URL to the server-side script that will process file upload.
45        :param value: (Optional) The default list of loaded files.
46        :param css: (Optional) Adds style classes to the control.
47        :param height: (Optional) The height of the control.
48        :param width: (Optional) The width of the control.
49        :param padding: (Optional) Sets padding between the cell and border.
50        :param hidden: (Optional) Whether the control is hidden.
51        :param disabled: (Optional) Whether the control is disabled.
52        :param fieldName: (Optional) Name of the file field in the form data.
53        :param params: (Optional) Extra parameters for sending XMLHttpRequest.
54        :param headerParams: (Optional) Additional parameters for Request Headers.
55        :param singleRequest: (Optional) Whether files are sent in one request.
56        :param updateFromResponse: (Optional) Updates file attributes from server response.
57        :param autosend: (Optional) Enables automatic sending of an added file.
58        :param accept: (Optional) Specifies the type/extension displayed in the dialog.
59        :param validation: (Optional) The validation function.
60        :param required: (Optional) Whether the control is required.
61        :param hiddenLabel: (Optional) Makes the label invisible.
62        :param label: (Optional) Specifies a label for the control.
63        :param labelPosition: (Optional) Position of the label.
64        :param labelWidth: (Optional) Width of the label.
65        :param helpMessage: (Optional) Adds a help message to the control.
66        :param preMessage: (Optional) Instructions for interacting with the control.
67        :param successMessage: (Optional) Message after successful validation.
68        :param errorMessage: (Optional) Message after validation error.
69        """
70        self.type = "simpleVault"
71        self.name = name
72        self.id = id
73        self.target = target
74        self.value = value
75        self.css = css
76        self.height = height
77        self.width = width
78        self.padding = padding
79        self.hidden = hidden
80        self.disabled = disabled
81        self.fieldName = fieldName
82        self.params = params
83        self.headerParams = headerParams
84        self.singleRequest = singleRequest
85        self.updateFromResponse = updateFromResponse
86        self.autosend = autosend
87        self.accept = accept
88        self.validation = validation
89        self.required = required
90        self.hiddenLabel = hiddenLabel
91        self.label = label
92        self.labelPosition = labelPosition
93        self.labelWidth = labelWidth
94        self.helpMessage = helpMessage
95        self.preMessage = preMessage
96        self.successMessage = successMessage
97        self.errorMessage = errorMessage

Initializes the SimpleVaultConfig.

Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • target: (Optional) URL to the server-side script that will process file upload.
  • value: (Optional) The default list of loaded files.
  • css: (Optional) Adds style classes to the control.
  • height: (Optional) The height of the control.
  • width: (Optional) The width of the control.
  • padding: (Optional) Sets padding between the cell and border.
  • hidden: (Optional) Whether the control is hidden.
  • disabled: (Optional) Whether the control is disabled.
  • fieldName: (Optional) Name of the file field in the form data.
  • params: (Optional) Extra parameters for sending XMLHttpRequest.
  • headerParams: (Optional) Additional parameters for Request Headers.
  • singleRequest: (Optional) Whether files are sent in one request.
  • updateFromResponse: (Optional) Updates file attributes from server response.
  • autosend: (Optional) Enables automatic sending of an added file.
  • accept: (Optional) Specifies the type/extension displayed in the dialog.
  • validation: (Optional) The validation function.
  • required: (Optional) Whether the control is required.
  • hiddenLabel: (Optional) Makes the label invisible.
  • label: (Optional) Specifies a label for the control.
  • labelPosition: (Optional) Position of the label.
  • labelWidth: (Optional) Width of the label.
  • helpMessage: (Optional) Adds a help message to the control.
  • preMessage: (Optional) Instructions for interacting with the control.
  • successMessage: (Optional) Message after successful validation.
  • errorMessage: (Optional) Message after validation error.
type
name
id
target
value
css
height
width
padding
hidden
disabled
fieldName
params
headerParams
singleRequest
updateFromResponse
autosend
accept
validation
required
hiddenLabel
label
labelPosition
labelWidth
helpMessage
preMessage
successMessage
errorMessage
def to_dict(self) -> Dict[str, Any]:
 99    def to_dict(self) -> Dict[str, Any]:
100        """
101        Converts the SimpleVaultConfig into a dictionary format.
102        """
103        config_dict = {
104            'type': self.type,
105            'name': self.name,
106            'id': self.id,
107            'target': self.target,
108            'value': self.value,
109            'css': self.css,
110            'height': self.height,
111            'width': self.width,
112            'padding': self.padding,
113            'hidden': self.hidden,
114            'disabled': self.disabled,
115            'fieldName': self.fieldName,
116            'params': self.params,
117            'headerParams': self.headerParams,
118            'singleRequest': self.singleRequest,
119            'updateFromResponse': self.updateFromResponse,
120            'autosend': self.autosend,
121            'accept': self.accept,
122            'validation': self.validation,
123            'required': self.required,
124            'hiddenLabel': self.hiddenLabel,
125            'label': self.label,
126            'labelPosition': self.labelPosition,
127            'labelWidth': self.labelWidth,
128            'helpMessage': self.helpMessage,
129            'preMessage': self.preMessage,
130            'successMessage': self.successMessage,
131            'errorMessage': self.errorMessage
132        }
133        # Remove None values
134        config_dict = {k: v for k, v in config_dict.items() if v is not None}
135
136        # Handle validation function
137        if 'validation' in config_dict and callable(config_dict['validation']):
138            config_dict['validation'] = create_proxy(self.validation)
139
140        return config_dict

Converts the SimpleVaultConfig into a dictionary format.

class SliderConfig:
  6class SliderConfig:
  7    """
  8    Configuration class for the Slider control.
  9    """
 10    def __init__(self,
 11                 name: str = None,
 12                 id: str = None,
 13                 value: Union[float, List[float]] = None,
 14                 css: str = None,
 15                 disabled: bool = False,
 16                 height: Union[str, int] = "content",
 17                 hidden: bool = False,
 18                 padding: Union[str, int] = "5px",
 19                 width: Union[str, int] = "content",
 20                 inverse: bool = False,
 21                 majorTick: Union[int, float] = None,
 22                 max: Union[int, float] = 100,
 23                 min: Union[int, float] = 0,
 24                 mode: str = "horizontal",
 25                 range: bool = False,
 26                 step: Union[int, float] = 1,
 27                 tick: Union[int, float] = None,
 28                 tickTemplate: Callable[[Any], str] = None,
 29                 tooltip: bool = True,
 30                 hiddenLabel: bool = False,
 31                 label: str = None,
 32                 labelPosition: str = "top",
 33                 labelWidth: Union[str, int] = None,
 34                 helpMessage: str = None):
 35        """
 36        Initializes the SliderConfig.
 37
 38        :param name: (Optional) The name of the control.
 39        :param id: (Optional) The id of the control.
 40        :param value: (Optional) The initial value(s) of the slider.
 41        :param css: (Optional) Adds style classes to the control.
 42        :param disabled: (Optional) Whether the control is disabled.
 43        :param height: (Optional) The height of the control.
 44        :param hidden: (Optional) Whether the control is hidden.
 45        :param padding: (Optional) Sets padding between the cell and border.
 46        :param width: (Optional) The width of the control.
 47        :param inverse: (Optional) Enables the inverse slider mode.
 48        :param majorTick: (Optional) Interval of rendering numeric values on the scale.
 49        :param max: (Optional) The maximal value of the slider.
 50        :param min: (Optional) The minimal value of the slider.
 51        :param mode: (Optional) Direction of the Slider scale.
 52        :param range: (Optional) Enables selecting a range of values.
 53        :param step: (Optional) The step the slider thumb will be moved with.
 54        :param tick: (Optional) Interval of steps for rendering the scale.
 55        :param tickTemplate: (Optional) Template for rendering values on the scale.
 56        :param tooltip: (Optional) Enables prompt messages with ticks values.
 57        :param hiddenLabel: (Optional) Makes the label invisible.
 58        :param label: (Optional) Specifies a label for the control.
 59        :param labelPosition: (Optional) Position of the label.
 60        :param labelWidth: (Optional) Width of the label.
 61        :param helpMessage: (Optional) Adds a help message to the control.
 62        """
 63        self.type = "slider"
 64        self.name = name
 65        self.id = id
 66        self.value = value
 67        self.css = css
 68        self.disabled = disabled
 69        self.height = height
 70        self.hidden = hidden
 71        self.padding = padding
 72        self.width = width
 73        self.inverse = inverse
 74        self.majorTick = majorTick
 75        self.max = max
 76        self.min = min
 77        self.mode = mode
 78        self.range = range
 79        self.step = step
 80        self.tick = tick
 81        self.tickTemplate = tickTemplate
 82        self.tooltip = tooltip
 83        self.hiddenLabel = hiddenLabel
 84        self.label = label
 85        self.labelPosition = labelPosition
 86        self.labelWidth = labelWidth
 87        self.helpMessage = helpMessage
 88
 89    def to_dict(self) -> Dict[str, Any]:
 90        """
 91        Converts the SliderConfig into a dictionary format.
 92        """
 93        config_dict = {
 94            'type': self.type,
 95            'name': self.name,
 96            'id': self.id,
 97            'value': self.value,
 98            'css': self.css,
 99            'disabled': self.disabled,
100            'height': self.height,
101            'hidden': self.hidden,
102            'padding': self.padding,
103            'width': self.width,
104            'inverse': self.inverse,
105            'majorTick': self.majorTick,
106            'max': self.max,
107            'min': self.min,
108            'mode': self.mode,
109            'range': self.range,
110            'step': self.step,
111            'tick': self.tick,
112            'tickTemplate': self.tickTemplate,
113            'tooltip': self.tooltip,
114            'hiddenLabel': self.hiddenLabel,
115            'label': self.label,
116            'labelPosition': self.labelPosition,
117            'labelWidth': self.labelWidth,
118            'helpMessage': self.helpMessage
119        }
120        # Remove None values
121        config_dict = {k: v for k, v in config_dict.items() if v is not None}
122
123        # Handle tickTemplate function
124        if 'tickTemplate' in config_dict and callable(config_dict['tickTemplate']):
125            config_dict['tickTemplate'] = create_proxy(self.tickTemplate)
126
127        return config_dict

Configuration class for the Slider control.

SliderConfig( name: str = None, id: str = None, value: Union[float, List[float]] = None, css: str = None, disabled: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', width: Union[str, int] = 'content', inverse: bool = False, majorTick: Union[int, float] = None, max: Union[int, float] = 100, min: Union[int, float] = 0, mode: str = 'horizontal', range: bool = False, step: Union[int, float] = 1, tick: Union[int, float] = None, tickTemplate: Callable[[Any], str] = None, tooltip: bool = True, hiddenLabel: bool = False, label: str = None, labelPosition: str = 'top', labelWidth: Union[str, int] = None, helpMessage: str = None)
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 value: Union[float, List[float]] = None,
14                 css: str = None,
15                 disabled: bool = False,
16                 height: Union[str, int] = "content",
17                 hidden: bool = False,
18                 padding: Union[str, int] = "5px",
19                 width: Union[str, int] = "content",
20                 inverse: bool = False,
21                 majorTick: Union[int, float] = None,
22                 max: Union[int, float] = 100,
23                 min: Union[int, float] = 0,
24                 mode: str = "horizontal",
25                 range: bool = False,
26                 step: Union[int, float] = 1,
27                 tick: Union[int, float] = None,
28                 tickTemplate: Callable[[Any], str] = None,
29                 tooltip: bool = True,
30                 hiddenLabel: bool = False,
31                 label: str = None,
32                 labelPosition: str = "top",
33                 labelWidth: Union[str, int] = None,
34                 helpMessage: str = None):
35        """
36        Initializes the SliderConfig.
37
38        :param name: (Optional) The name of the control.
39        :param id: (Optional) The id of the control.
40        :param value: (Optional) The initial value(s) of the slider.
41        :param css: (Optional) Adds style classes to the control.
42        :param disabled: (Optional) Whether the control is disabled.
43        :param height: (Optional) The height of the control.
44        :param hidden: (Optional) Whether the control is hidden.
45        :param padding: (Optional) Sets padding between the cell and border.
46        :param width: (Optional) The width of the control.
47        :param inverse: (Optional) Enables the inverse slider mode.
48        :param majorTick: (Optional) Interval of rendering numeric values on the scale.
49        :param max: (Optional) The maximal value of the slider.
50        :param min: (Optional) The minimal value of the slider.
51        :param mode: (Optional) Direction of the Slider scale.
52        :param range: (Optional) Enables selecting a range of values.
53        :param step: (Optional) The step the slider thumb will be moved with.
54        :param tick: (Optional) Interval of steps for rendering the scale.
55        :param tickTemplate: (Optional) Template for rendering values on the scale.
56        :param tooltip: (Optional) Enables prompt messages with ticks values.
57        :param hiddenLabel: (Optional) Makes the label invisible.
58        :param label: (Optional) Specifies a label for the control.
59        :param labelPosition: (Optional) Position of the label.
60        :param labelWidth: (Optional) Width of the label.
61        :param helpMessage: (Optional) Adds a help message to the control.
62        """
63        self.type = "slider"
64        self.name = name
65        self.id = id
66        self.value = value
67        self.css = css
68        self.disabled = disabled
69        self.height = height
70        self.hidden = hidden
71        self.padding = padding
72        self.width = width
73        self.inverse = inverse
74        self.majorTick = majorTick
75        self.max = max
76        self.min = min
77        self.mode = mode
78        self.range = range
79        self.step = step
80        self.tick = tick
81        self.tickTemplate = tickTemplate
82        self.tooltip = tooltip
83        self.hiddenLabel = hiddenLabel
84        self.label = label
85        self.labelPosition = labelPosition
86        self.labelWidth = labelWidth
87        self.helpMessage = helpMessage

Initializes the SliderConfig.

Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • value: (Optional) The initial value(s) of the slider.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • width: (Optional) The width of the control.
  • inverse: (Optional) Enables the inverse slider mode.
  • majorTick: (Optional) Interval of rendering numeric values on the scale.
  • max: (Optional) The maximal value of the slider.
  • min: (Optional) The minimal value of the slider.
  • mode: (Optional) Direction of the Slider scale.
  • range: (Optional) Enables selecting a range of values.
  • step: (Optional) The step the slider thumb will be moved with.
  • tick: (Optional) Interval of steps for rendering the scale.
  • tickTemplate: (Optional) Template for rendering values on the scale.
  • tooltip: (Optional) Enables prompt messages with ticks values.
  • hiddenLabel: (Optional) Makes the label invisible.
  • label: (Optional) Specifies a label for the control.
  • labelPosition: (Optional) Position of the label.
  • labelWidth: (Optional) Width of the label.
  • helpMessage: (Optional) Adds a help message to the control.
type
name
id
value
css
disabled
height
hidden
padding
width
inverse
majorTick
max
min
mode
range
step
tick
tickTemplate
tooltip
hiddenLabel
label
labelPosition
labelWidth
helpMessage
def to_dict(self) -> Dict[str, Any]:
 89    def to_dict(self) -> Dict[str, Any]:
 90        """
 91        Converts the SliderConfig into a dictionary format.
 92        """
 93        config_dict = {
 94            'type': self.type,
 95            'name': self.name,
 96            'id': self.id,
 97            'value': self.value,
 98            'css': self.css,
 99            'disabled': self.disabled,
100            'height': self.height,
101            'hidden': self.hidden,
102            'padding': self.padding,
103            'width': self.width,
104            'inverse': self.inverse,
105            'majorTick': self.majorTick,
106            'max': self.max,
107            'min': self.min,
108            'mode': self.mode,
109            'range': self.range,
110            'step': self.step,
111            'tick': self.tick,
112            'tickTemplate': self.tickTemplate,
113            'tooltip': self.tooltip,
114            'hiddenLabel': self.hiddenLabel,
115            'label': self.label,
116            'labelPosition': self.labelPosition,
117            'labelWidth': self.labelWidth,
118            'helpMessage': self.helpMessage
119        }
120        # Remove None values
121        config_dict = {k: v for k, v in config_dict.items() if v is not None}
122
123        # Handle tickTemplate function
124        if 'tickTemplate' in config_dict and callable(config_dict['tickTemplate']):
125            config_dict['tickTemplate'] = create_proxy(self.tickTemplate)
126
127        return config_dict

Converts the SliderConfig into a dictionary format.

class SpacerConfig:
 6class SpacerConfig:
 7    """
 8    Configuration class for the Spacer control.
 9    """
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 css: str = None,
14                 height: Union[str, int] = "content",
15                 hidden: bool = False,
16                 padding: Union[str, int] = "5px",
17                 width: Union[str, int] = "content"):
18        """
19        Initializes the SpacerConfig.
20
21        :param name: (Optional) The name of the control.
22        :param id: (Optional) The id of the control.
23        :param css: (Optional) Adds style classes to the control.
24        :param height: (Optional) The height of the control.
25        :param hidden: (Optional) Whether the control is hidden.
26        :param padding: (Optional) Sets padding between the cell and border.
27        :param width: (Optional) The width of the control.
28        """
29        self.type = "spacer"
30        self.name = name
31        self.id = id
32        self.css = css
33        self.height = height
34        self.hidden = hidden
35        self.padding = padding
36        self.width = width
37
38    def to_dict(self) -> Dict[str, Any]:
39        """
40        Converts the SpacerConfig into a dictionary format.
41        """
42        config_dict = {
43            'type': self.type,
44            'name': self.name,
45            'id': self.id,
46            'css': self.css,
47            'height': self.height,
48            'hidden': self.hidden,
49            'padding': self.padding,
50            'width': self.width
51        }
52        # Remove None values
53        return {k: v for k, v in config_dict.items() if v is not None}

Configuration class for the Spacer control.

SpacerConfig( name: str = None, id: str = None, css: str = None, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', width: Union[str, int] = 'content')
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 css: str = None,
14                 height: Union[str, int] = "content",
15                 hidden: bool = False,
16                 padding: Union[str, int] = "5px",
17                 width: Union[str, int] = "content"):
18        """
19        Initializes the SpacerConfig.
20
21        :param name: (Optional) The name of the control.
22        :param id: (Optional) The id of the control.
23        :param css: (Optional) Adds style classes to the control.
24        :param height: (Optional) The height of the control.
25        :param hidden: (Optional) Whether the control is hidden.
26        :param padding: (Optional) Sets padding between the cell and border.
27        :param width: (Optional) The width of the control.
28        """
29        self.type = "spacer"
30        self.name = name
31        self.id = id
32        self.css = css
33        self.height = height
34        self.hidden = hidden
35        self.padding = padding
36        self.width = width

Initializes the SpacerConfig.

Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • css: (Optional) Adds style classes to the control.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • width: (Optional) The width of the control.
type
name
id
css
height
hidden
padding
width
def to_dict(self) -> Dict[str, Any]:
38    def to_dict(self) -> Dict[str, Any]:
39        """
40        Converts the SpacerConfig into a dictionary format.
41        """
42        config_dict = {
43            'type': self.type,
44            'name': self.name,
45            'id': self.id,
46            'css': self.css,
47            'height': self.height,
48            'hidden': self.hidden,
49            'padding': self.padding,
50            'width': self.width
51        }
52        # Remove None values
53        return {k: v for k, v in config_dict.items() if v is not None}

Converts the SpacerConfig into a dictionary format.

class TextConfig:
 6class TextConfig:
 7    """
 8    Configuration class for the Text control.
 9    """
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 value: Union[str, int] = None,
14                 css: str = None,
15                 disabled: bool = False,
16                 height: Union[str, int] = "content",
17                 hidden: bool = False,
18                 padding: Union[str, int] = "5px",
19                 width: Union[str, int] = "content",
20                 inputType: str = "text",
21                 hiddenLabel: bool = False,
22                 label: str = None,
23                 labelPosition: str = "top",
24                 labelWidth: Union[str, int] = None,
25                 helpMessage: str = None,
26                 preMessage: str = None,
27                 successMessage: str = None,
28                 errorMessage: str = None):
29        """
30        Initializes the TextConfig.
31
32        :param name: (Optional) The name of the control.
33        :param id: (Optional) The id of the control.
34        :param value: (Optional) The value of the text control.
35        :param css: (Optional) Adds style classes to the control.
36        :param disabled: (Optional) Whether the control is disabled.
37        :param height: (Optional) The height of the control.
38        :param hidden: (Optional) Whether the control is hidden.
39        :param padding: (Optional) Sets padding between the cell and border.
40        :param width: (Optional) The width of the control.
41        :param inputType: (Optional) Type of input: "text", "password", "number".
42        :param hiddenLabel: (Optional) Makes the label invisible.
43        :param label: (Optional) Specifies a label for the control.
44        :param labelPosition: (Optional) Position of the label.
45        :param labelWidth: (Optional) Width of the label.
46        :param helpMessage: (Optional) Adds a help message to the control.
47        :param preMessage: (Optional) Instructions for interacting with the control.
48        :param successMessage: (Optional) Message after successful validation.
49        :param errorMessage: (Optional) Message after validation error.
50        """
51        self.type = "text"
52        self.name = name
53        self.id = id
54        self.value = value
55        self.css = css
56        self.disabled = disabled
57        self.height = height
58        self.hidden = hidden
59        self.padding = padding
60        self.width = width
61        self.inputType = inputType
62        self.hiddenLabel = hiddenLabel
63        self.label = label
64        self.labelPosition = labelPosition
65        self.labelWidth = labelWidth
66        self.helpMessage = helpMessage
67        self.preMessage = preMessage
68        self.successMessage = successMessage
69        self.errorMessage = errorMessage
70
71    def to_dict(self) -> Dict[str, Any]:
72        """
73        Converts the TextConfig into a dictionary format.
74        """
75        config_dict = {
76            'type': self.type,
77            'name': self.name,
78            'id': self.id,
79            'value': self.value,
80            'css': self.css,
81            'disabled': self.disabled,
82            'height': self.height,
83            'hidden': self.hidden,
84            'padding': self.padding,
85            'width': self.width,
86            'inputType': self.inputType,
87            'hiddenLabel': self.hiddenLabel,
88            'label': self.label,
89            'labelPosition': self.labelPosition,
90            'labelWidth': self.labelWidth,
91            'helpMessage': self.helpMessage,
92            'preMessage': self.preMessage,
93            'successMessage': self.successMessage,
94            'errorMessage': self.errorMessage
95        }
96        # Remove None values
97        return {k: v for k, v in config_dict.items() if v is not None}

Configuration class for the Text control.

TextConfig( name: str = None, id: str = None, value: Union[str, int] = None, css: str = None, disabled: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', width: Union[str, int] = 'content', inputType: str = 'text', hiddenLabel: bool = False, label: str = None, labelPosition: str = 'top', labelWidth: Union[str, int] = None, helpMessage: str = None, preMessage: str = None, successMessage: str = None, errorMessage: str = None)
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 value: Union[str, int] = None,
14                 css: str = None,
15                 disabled: bool = False,
16                 height: Union[str, int] = "content",
17                 hidden: bool = False,
18                 padding: Union[str, int] = "5px",
19                 width: Union[str, int] = "content",
20                 inputType: str = "text",
21                 hiddenLabel: bool = False,
22                 label: str = None,
23                 labelPosition: str = "top",
24                 labelWidth: Union[str, int] = None,
25                 helpMessage: str = None,
26                 preMessage: str = None,
27                 successMessage: str = None,
28                 errorMessage: str = None):
29        """
30        Initializes the TextConfig.
31
32        :param name: (Optional) The name of the control.
33        :param id: (Optional) The id of the control.
34        :param value: (Optional) The value of the text control.
35        :param css: (Optional) Adds style classes to the control.
36        :param disabled: (Optional) Whether the control is disabled.
37        :param height: (Optional) The height of the control.
38        :param hidden: (Optional) Whether the control is hidden.
39        :param padding: (Optional) Sets padding between the cell and border.
40        :param width: (Optional) The width of the control.
41        :param inputType: (Optional) Type of input: "text", "password", "number".
42        :param hiddenLabel: (Optional) Makes the label invisible.
43        :param label: (Optional) Specifies a label for the control.
44        :param labelPosition: (Optional) Position of the label.
45        :param labelWidth: (Optional) Width of the label.
46        :param helpMessage: (Optional) Adds a help message to the control.
47        :param preMessage: (Optional) Instructions for interacting with the control.
48        :param successMessage: (Optional) Message after successful validation.
49        :param errorMessage: (Optional) Message after validation error.
50        """
51        self.type = "text"
52        self.name = name
53        self.id = id
54        self.value = value
55        self.css = css
56        self.disabled = disabled
57        self.height = height
58        self.hidden = hidden
59        self.padding = padding
60        self.width = width
61        self.inputType = inputType
62        self.hiddenLabel = hiddenLabel
63        self.label = label
64        self.labelPosition = labelPosition
65        self.labelWidth = labelWidth
66        self.helpMessage = helpMessage
67        self.preMessage = preMessage
68        self.successMessage = successMessage
69        self.errorMessage = errorMessage

Initializes the TextConfig.

Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • value: (Optional) The value of the text control.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • width: (Optional) The width of the control.
  • inputType: (Optional) Type of input: "text", "password", "number".
  • hiddenLabel: (Optional) Makes the label invisible.
  • label: (Optional) Specifies a label for the control.
  • labelPosition: (Optional) Position of the label.
  • labelWidth: (Optional) Width of the label.
  • helpMessage: (Optional) Adds a help message to the control.
  • preMessage: (Optional) Instructions for interacting with the control.
  • successMessage: (Optional) Message after successful validation.
  • errorMessage: (Optional) Message after validation error.
type
name
id
value
css
disabled
height
hidden
padding
width
inputType
hiddenLabel
label
labelPosition
labelWidth
helpMessage
preMessage
successMessage
errorMessage
def to_dict(self) -> Dict[str, Any]:
71    def to_dict(self) -> Dict[str, Any]:
72        """
73        Converts the TextConfig into a dictionary format.
74        """
75        config_dict = {
76            'type': self.type,
77            'name': self.name,
78            'id': self.id,
79            'value': self.value,
80            'css': self.css,
81            'disabled': self.disabled,
82            'height': self.height,
83            'hidden': self.hidden,
84            'padding': self.padding,
85            'width': self.width,
86            'inputType': self.inputType,
87            'hiddenLabel': self.hiddenLabel,
88            'label': self.label,
89            'labelPosition': self.labelPosition,
90            'labelWidth': self.labelWidth,
91            'helpMessage': self.helpMessage,
92            'preMessage': self.preMessage,
93            'successMessage': self.successMessage,
94            'errorMessage': self.errorMessage
95        }
96        # Remove None values
97        return {k: v for k, v in config_dict.items() if v is not None}

Converts the TextConfig into a dictionary format.

class TextareaConfig:
  7class TextareaConfig:
  8    """
  9    Configuration class for the Textarea control.
 10    """
 11    def __init__(self,
 12                 name: str = None,
 13                 id: str = None,
 14                 value: str = None,
 15                 css: str = None,
 16                 disabled: bool = False,
 17                 height: Union[str, int] = "content",
 18                 hidden: bool = False,
 19                 padding: Union[str, int] = "5px",
 20                 required: bool = False,
 21                 validation: Union[str, Callable[[Any], bool]] = None,
 22                 width: Union[str, int] = "content",
 23                 maxlength: int = None,
 24                 minlength: int = None,
 25                 placeholder: str = None,
 26                 readOnly: bool = False,
 27                 resizable: bool = False,
 28                 hiddenLabel: bool = False,
 29                 label: str = None,
 30                 labelPosition: str = "top",
 31                 labelWidth: Union[str, int] = None,
 32                 helpMessage: str = None,
 33                 preMessage: str = None,
 34                 successMessage: str = None,
 35                 errorMessage: str = None):
 36        """
 37        Initializes the TextareaConfig.
 38
 39        :param name: (Optional) The name of the control.
 40        :param id: (Optional) The id of the control.
 41        :param value: (Optional) The initial value of the textarea.
 42        :param css: (Optional) Adds style classes to the control.
 43        :param disabled: (Optional) Whether the control is disabled.
 44        :param height: (Optional) The height of the control.
 45        :param hidden: (Optional) Whether the control is hidden.
 46        :param padding: (Optional) Sets padding between the cell and border.
 47        :param required: (Optional) Whether the control is required.
 48        :param validation: (Optional) The validation rule or function.
 49        :param width: (Optional) The width of the control.
 50        :param maxlength: (Optional) Maximum number of characters allowed.
 51        :param minlength: (Optional) Minimum number of characters required.
 52        :param placeholder: (Optional) A tip for the textarea.
 53        :param readOnly: (Optional) Whether the textarea is readonly.
 54        :param resizable: (Optional) Adds a resizer icon into a textarea.
 55        :param hiddenLabel: (Optional) Makes the label invisible.
 56        :param label: (Optional) Specifies a label for the control.
 57        :param labelPosition: (Optional) Position of the label.
 58        :param labelWidth: (Optional) Width of the label.
 59        :param helpMessage: (Optional) Adds a help message to the control.
 60        :param preMessage: (Optional) Instructions for interacting with the control.
 61        :param successMessage: (Optional) Message after successful validation.
 62        :param errorMessage: (Optional) Message after validation error.
 63        """
 64        self.type = "textarea"
 65        self.name = name
 66        self.id = id
 67        self.value = value
 68        self.css = css
 69        self.disabled = disabled
 70        self.height = height
 71        self.hidden = hidden
 72        self.padding = padding
 73        self.required = required
 74        self.validation = validation
 75        self.width = width
 76        self.maxlength = maxlength
 77        self.minlength = minlength
 78        self.placeholder = placeholder
 79        self.readOnly = readOnly
 80        self.resizable = resizable
 81        self.hiddenLabel = hiddenLabel
 82        self.label = label
 83        self.labelPosition = labelPosition
 84        self.labelWidth = labelWidth
 85        self.helpMessage = helpMessage
 86        self.preMessage = preMessage
 87        self.successMessage = successMessage
 88        self.errorMessage = errorMessage
 89
 90    def to_dict(self) -> Dict[str, Any]:
 91        """
 92        Converts the TextareaConfig into a dictionary format.
 93        """
 94        config_dict = {
 95            'type': self.type,
 96            'name': self.name,
 97            'id': self.id,
 98            'value': self.value,
 99            'css': self.css,
100            'disabled': self.disabled,
101            'height': self.height,
102            'hidden': self.hidden,
103            'padding': self.padding,
104            'required': self.required,
105            'validation': self.validation,
106            'width': self.width,
107            'maxlength': self.maxlength,
108            'minlength': self.minlength,
109            'placeholder': self.placeholder,
110            'readOnly': self.readOnly,
111            'resizable': self.resizable,
112            'hiddenLabel': self.hiddenLabel,
113            'label': self.label,
114            'labelPosition': self.labelPosition,
115            'labelWidth': self.labelWidth,
116            'helpMessage': self.helpMessage,
117            'preMessage': self.preMessage,
118            'successMessage': self.successMessage,
119            'errorMessage': self.errorMessage
120        }
121        # Remove None values
122        config_dict = {k: v for k, v in config_dict.items() if v is not None}
123
124        # Handle validation function
125        if 'validation' in config_dict and callable(config_dict['validation']):
126            config_dict['validation'] = create_proxy(self.validation)
127
128        return config_dict

Configuration class for the Textarea control.

TextareaConfig( name: str = None, id: str = None, value: str = None, css: str = None, disabled: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', required: bool = False, validation: Union[str, Callable[[Any], bool]] = None, width: Union[str, int] = 'content', maxlength: int = None, minlength: int = None, placeholder: str = None, readOnly: bool = False, resizable: bool = False, hiddenLabel: bool = False, label: str = None, labelPosition: str = 'top', labelWidth: Union[str, int] = None, helpMessage: str = None, preMessage: str = None, successMessage: str = None, errorMessage: str = None)
11    def __init__(self,
12                 name: str = None,
13                 id: str = None,
14                 value: str = None,
15                 css: str = None,
16                 disabled: bool = False,
17                 height: Union[str, int] = "content",
18                 hidden: bool = False,
19                 padding: Union[str, int] = "5px",
20                 required: bool = False,
21                 validation: Union[str, Callable[[Any], bool]] = None,
22                 width: Union[str, int] = "content",
23                 maxlength: int = None,
24                 minlength: int = None,
25                 placeholder: str = None,
26                 readOnly: bool = False,
27                 resizable: bool = False,
28                 hiddenLabel: bool = False,
29                 label: str = None,
30                 labelPosition: str = "top",
31                 labelWidth: Union[str, int] = None,
32                 helpMessage: str = None,
33                 preMessage: str = None,
34                 successMessage: str = None,
35                 errorMessage: str = None):
36        """
37        Initializes the TextareaConfig.
38
39        :param name: (Optional) The name of the control.
40        :param id: (Optional) The id of the control.
41        :param value: (Optional) The initial value of the textarea.
42        :param css: (Optional) Adds style classes to the control.
43        :param disabled: (Optional) Whether the control is disabled.
44        :param height: (Optional) The height of the control.
45        :param hidden: (Optional) Whether the control is hidden.
46        :param padding: (Optional) Sets padding between the cell and border.
47        :param required: (Optional) Whether the control is required.
48        :param validation: (Optional) The validation rule or function.
49        :param width: (Optional) The width of the control.
50        :param maxlength: (Optional) Maximum number of characters allowed.
51        :param minlength: (Optional) Minimum number of characters required.
52        :param placeholder: (Optional) A tip for the textarea.
53        :param readOnly: (Optional) Whether the textarea is readonly.
54        :param resizable: (Optional) Adds a resizer icon into a textarea.
55        :param hiddenLabel: (Optional) Makes the label invisible.
56        :param label: (Optional) Specifies a label for the control.
57        :param labelPosition: (Optional) Position of the label.
58        :param labelWidth: (Optional) Width of the label.
59        :param helpMessage: (Optional) Adds a help message to the control.
60        :param preMessage: (Optional) Instructions for interacting with the control.
61        :param successMessage: (Optional) Message after successful validation.
62        :param errorMessage: (Optional) Message after validation error.
63        """
64        self.type = "textarea"
65        self.name = name
66        self.id = id
67        self.value = value
68        self.css = css
69        self.disabled = disabled
70        self.height = height
71        self.hidden = hidden
72        self.padding = padding
73        self.required = required
74        self.validation = validation
75        self.width = width
76        self.maxlength = maxlength
77        self.minlength = minlength
78        self.placeholder = placeholder
79        self.readOnly = readOnly
80        self.resizable = resizable
81        self.hiddenLabel = hiddenLabel
82        self.label = label
83        self.labelPosition = labelPosition
84        self.labelWidth = labelWidth
85        self.helpMessage = helpMessage
86        self.preMessage = preMessage
87        self.successMessage = successMessage
88        self.errorMessage = errorMessage

Initializes the TextareaConfig.

Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • value: (Optional) The initial value of the textarea.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • required: (Optional) Whether the control is required.
  • validation: (Optional) The validation rule or function.
  • width: (Optional) The width of the control.
  • maxlength: (Optional) Maximum number of characters allowed.
  • minlength: (Optional) Minimum number of characters required.
  • placeholder: (Optional) A tip for the textarea.
  • readOnly: (Optional) Whether the textarea is readonly.
  • resizable: (Optional) Adds a resizer icon into a textarea.
  • hiddenLabel: (Optional) Makes the label invisible.
  • label: (Optional) Specifies a label for the control.
  • labelPosition: (Optional) Position of the label.
  • labelWidth: (Optional) Width of the label.
  • helpMessage: (Optional) Adds a help message to the control.
  • preMessage: (Optional) Instructions for interacting with the control.
  • successMessage: (Optional) Message after successful validation.
  • errorMessage: (Optional) Message after validation error.
type
name
id
value
css
disabled
height
hidden
padding
required
validation
width
maxlength
minlength
placeholder
readOnly
resizable
hiddenLabel
label
labelPosition
labelWidth
helpMessage
preMessage
successMessage
errorMessage
def to_dict(self) -> Dict[str, Any]:
 90    def to_dict(self) -> Dict[str, Any]:
 91        """
 92        Converts the TextareaConfig into a dictionary format.
 93        """
 94        config_dict = {
 95            'type': self.type,
 96            'name': self.name,
 97            'id': self.id,
 98            'value': self.value,
 99            'css': self.css,
100            'disabled': self.disabled,
101            'height': self.height,
102            'hidden': self.hidden,
103            'padding': self.padding,
104            'required': self.required,
105            'validation': self.validation,
106            'width': self.width,
107            'maxlength': self.maxlength,
108            'minlength': self.minlength,
109            'placeholder': self.placeholder,
110            'readOnly': self.readOnly,
111            'resizable': self.resizable,
112            'hiddenLabel': self.hiddenLabel,
113            'label': self.label,
114            'labelPosition': self.labelPosition,
115            'labelWidth': self.labelWidth,
116            'helpMessage': self.helpMessage,
117            'preMessage': self.preMessage,
118            'successMessage': self.successMessage,
119            'errorMessage': self.errorMessage
120        }
121        # Remove None values
122        config_dict = {k: v for k, v in config_dict.items() if v is not None}
123
124        # Handle validation function
125        if 'validation' in config_dict and callable(config_dict['validation']):
126            config_dict['validation'] = create_proxy(self.validation)
127
128        return config_dict

Converts the TextareaConfig into a dictionary format.

class TimepickerConfig:
  7class TimepickerConfig:
  8    """
  9    Configuration class for the TimePicker control.
 10    """
 11    def __init__(self,
 12                 name: str = None,
 13                 id: str = None,
 14                 value: Union[str, int, float, Dict[str, Any], list] = None,
 15                 css: str = None,
 16                 disabled: bool = False,
 17                 editable: bool = False,
 18                 height: Union[str, int] = "content",
 19                 hidden: bool = False,
 20                 padding: Union[str, int] = "5px",
 21                 required: bool = False,
 22                 validation: Callable[[Any], bool] = None,
 23                 width: Union[str, int] = "content",
 24                 controls: bool = False,
 25                 icon: str = None,
 26                 placeholder: str = None,
 27                 timeFormat: int = 24,
 28                 valueFormat: str = "string",
 29                 hiddenLabel: bool = False,
 30                 label: str = None,
 31                 labelPosition: str = "top",
 32                 labelWidth: Union[str, int] = None,
 33                 helpMessage: str = None,
 34                 preMessage: str = None,
 35                 successMessage: str = None,
 36                 errorMessage: str = None):
 37        """
 38        Initializes the TimePickerConfig.
 39
 40        :param name: (Optional) The name of the control.
 41        :param id: (Optional) The id of the control.
 42        :param value: (Optional) The initial value of the TimePicker control.
 43        :param css: (Optional) Adds style classes to the control.
 44        :param disabled: (Optional) Whether the control is disabled.
 45        :param editable: (Optional) Allows user to enter the value manually.
 46        :param height: (Optional) The height of the control.
 47        :param hidden: (Optional) Whether the control is hidden.
 48        :param padding: (Optional) Sets padding between the cell and border.
 49        :param required: (Optional) Whether the control is required.
 50        :param validation: (Optional) The validation function.
 51        :param width: (Optional) The width of the control.
 52        :param controls: (Optional) Whether the timepicker has Close and Save buttons.
 53        :param icon: (Optional) The CSS class name of an icon.
 54        :param placeholder: (Optional) A tip for the input.
 55        :param timeFormat: (Optional) Clock format: 12 or 24.
 56        :param valueFormat: (Optional) Format of the value in events: "string", "timeObject".
 57        :param hiddenLabel: (Optional) Makes the label invisible.
 58        :param label: (Optional) Specifies a label for the control.
 59        :param labelPosition: (Optional) Position of the label.
 60        :param labelWidth: (Optional) Width of the label.
 61        :param helpMessage: (Optional) Adds a help message to the control.
 62        :param preMessage: (Optional) Instructions for interacting with the control.
 63        :param successMessage: (Optional) Message after successful validation.
 64        :param errorMessage: (Optional) Message after validation error.
 65        """
 66        self.type = "timepicker"
 67        self.name = name
 68        self.id = id
 69        self.value = value
 70        self.css = css
 71        self.disabled = disabled
 72        self.editable = editable
 73        self.height = height
 74        self.hidden = hidden
 75        self.padding = padding
 76        self.required = required
 77        self.validation = validation
 78        self.width = width
 79        self.controls = controls
 80        self.icon = icon
 81        self.placeholder = placeholder
 82        self.timeFormat = timeFormat
 83        self.valueFormat = valueFormat
 84        self.hiddenLabel = hiddenLabel
 85        self.label = label
 86        self.labelPosition = labelPosition
 87        self.labelWidth = labelWidth
 88        self.helpMessage = helpMessage
 89        self.preMessage = preMessage
 90        self.successMessage = successMessage
 91        self.errorMessage = errorMessage
 92
 93    def to_dict(self) -> Dict[str, Any]:
 94        """
 95        Converts the TimePickerConfig into a dictionary format.
 96        """
 97        config_dict = {
 98            'type': self.type,
 99            'name': self.name,
100            'id': self.id,
101            'value': self.value,
102            'css': self.css,
103            'disabled': self.disabled,
104            'editable': self.editable,
105            'height': self.height,
106            'hidden': self.hidden,
107            'padding': self.padding,
108            'required': self.required,
109            'validation': self.validation,
110            'width': self.width,
111            'controls': self.controls,
112            'icon': self.icon,
113            'placeholder': self.placeholder,
114            'timeFormat': self.timeFormat,
115            'valueFormat': self.valueFormat,
116            'hiddenLabel': self.hiddenLabel,
117            'label': self.label,
118            'labelPosition': self.labelPosition,
119            'labelWidth': self.labelWidth,
120            'helpMessage': self.helpMessage,
121            'preMessage': self.preMessage,
122            'successMessage': self.successMessage,
123            'errorMessage': self.errorMessage
124        }
125        # Remove None values
126        config_dict = {k: v for k, v in config_dict.items() if v is not None}
127
128        # Handle validation function
129        if 'validation' in config_dict and callable(config_dict['validation']):
130            config_dict['validation'] = create_proxy(self.validation)
131
132        return config_dict

Configuration class for the TimePicker control.

TimepickerConfig( name: str = None, id: str = None, value: Union[str, int, float, Dict[str, Any], list] = None, css: str = None, disabled: bool = False, editable: bool = False, height: Union[str, int] = 'content', hidden: bool = False, padding: Union[str, int] = '5px', required: bool = False, validation: Callable[[Any], bool] = None, width: Union[str, int] = 'content', controls: bool = False, icon: str = None, placeholder: str = None, timeFormat: int = 24, valueFormat: str = 'string', hiddenLabel: bool = False, label: str = None, labelPosition: str = 'top', labelWidth: Union[str, int] = None, helpMessage: str = None, preMessage: str = None, successMessage: str = None, errorMessage: str = None)
11    def __init__(self,
12                 name: str = None,
13                 id: str = None,
14                 value: Union[str, int, float, Dict[str, Any], list] = None,
15                 css: str = None,
16                 disabled: bool = False,
17                 editable: bool = False,
18                 height: Union[str, int] = "content",
19                 hidden: bool = False,
20                 padding: Union[str, int] = "5px",
21                 required: bool = False,
22                 validation: Callable[[Any], bool] = None,
23                 width: Union[str, int] = "content",
24                 controls: bool = False,
25                 icon: str = None,
26                 placeholder: str = None,
27                 timeFormat: int = 24,
28                 valueFormat: str = "string",
29                 hiddenLabel: bool = False,
30                 label: str = None,
31                 labelPosition: str = "top",
32                 labelWidth: Union[str, int] = None,
33                 helpMessage: str = None,
34                 preMessage: str = None,
35                 successMessage: str = None,
36                 errorMessage: str = None):
37        """
38        Initializes the TimePickerConfig.
39
40        :param name: (Optional) The name of the control.
41        :param id: (Optional) The id of the control.
42        :param value: (Optional) The initial value of the TimePicker control.
43        :param css: (Optional) Adds style classes to the control.
44        :param disabled: (Optional) Whether the control is disabled.
45        :param editable: (Optional) Allows user to enter the value manually.
46        :param height: (Optional) The height of the control.
47        :param hidden: (Optional) Whether the control is hidden.
48        :param padding: (Optional) Sets padding between the cell and border.
49        :param required: (Optional) Whether the control is required.
50        :param validation: (Optional) The validation function.
51        :param width: (Optional) The width of the control.
52        :param controls: (Optional) Whether the timepicker has Close and Save buttons.
53        :param icon: (Optional) The CSS class name of an icon.
54        :param placeholder: (Optional) A tip for the input.
55        :param timeFormat: (Optional) Clock format: 12 or 24.
56        :param valueFormat: (Optional) Format of the value in events: "string", "timeObject".
57        :param hiddenLabel: (Optional) Makes the label invisible.
58        :param label: (Optional) Specifies a label for the control.
59        :param labelPosition: (Optional) Position of the label.
60        :param labelWidth: (Optional) Width of the label.
61        :param helpMessage: (Optional) Adds a help message to the control.
62        :param preMessage: (Optional) Instructions for interacting with the control.
63        :param successMessage: (Optional) Message after successful validation.
64        :param errorMessage: (Optional) Message after validation error.
65        """
66        self.type = "timepicker"
67        self.name = name
68        self.id = id
69        self.value = value
70        self.css = css
71        self.disabled = disabled
72        self.editable = editable
73        self.height = height
74        self.hidden = hidden
75        self.padding = padding
76        self.required = required
77        self.validation = validation
78        self.width = width
79        self.controls = controls
80        self.icon = icon
81        self.placeholder = placeholder
82        self.timeFormat = timeFormat
83        self.valueFormat = valueFormat
84        self.hiddenLabel = hiddenLabel
85        self.label = label
86        self.labelPosition = labelPosition
87        self.labelWidth = labelWidth
88        self.helpMessage = helpMessage
89        self.preMessage = preMessage
90        self.successMessage = successMessage
91        self.errorMessage = errorMessage

Initializes the TimePickerConfig.

Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • value: (Optional) The initial value of the TimePicker control.
  • css: (Optional) Adds style classes to the control.
  • disabled: (Optional) Whether the control is disabled.
  • editable: (Optional) Allows user to enter the value manually.
  • height: (Optional) The height of the control.
  • hidden: (Optional) Whether the control is hidden.
  • padding: (Optional) Sets padding between the cell and border.
  • required: (Optional) Whether the control is required.
  • validation: (Optional) The validation function.
  • width: (Optional) The width of the control.
  • controls: (Optional) Whether the timepicker has Close and Save buttons.
  • icon: (Optional) The CSS class name of an icon.
  • placeholder: (Optional) A tip for the input.
  • timeFormat: (Optional) Clock format: 12 or 24.
  • valueFormat: (Optional) Format of the value in events: "string", "timeObject".
  • hiddenLabel: (Optional) Makes the label invisible.
  • label: (Optional) Specifies a label for the control.
  • labelPosition: (Optional) Position of the label.
  • labelWidth: (Optional) Width of the label.
  • helpMessage: (Optional) Adds a help message to the control.
  • preMessage: (Optional) Instructions for interacting with the control.
  • successMessage: (Optional) Message after successful validation.
  • errorMessage: (Optional) Message after validation error.
type
name
id
value
css
disabled
editable
height
hidden
padding
required
validation
width
controls
icon
placeholder
timeFormat
valueFormat
hiddenLabel
label
labelPosition
labelWidth
helpMessage
preMessage
successMessage
errorMessage
def to_dict(self) -> Dict[str, Any]:
 93    def to_dict(self) -> Dict[str, Any]:
 94        """
 95        Converts the TimePickerConfig into a dictionary format.
 96        """
 97        config_dict = {
 98            'type': self.type,
 99            'name': self.name,
100            'id': self.id,
101            'value': self.value,
102            'css': self.css,
103            'disabled': self.disabled,
104            'editable': self.editable,
105            'height': self.height,
106            'hidden': self.hidden,
107            'padding': self.padding,
108            'required': self.required,
109            'validation': self.validation,
110            'width': self.width,
111            'controls': self.controls,
112            'icon': self.icon,
113            'placeholder': self.placeholder,
114            'timeFormat': self.timeFormat,
115            'valueFormat': self.valueFormat,
116            'hiddenLabel': self.hiddenLabel,
117            'label': self.label,
118            'labelPosition': self.labelPosition,
119            'labelWidth': self.labelWidth,
120            'helpMessage': self.helpMessage,
121            'preMessage': self.preMessage,
122            'successMessage': self.successMessage,
123            'errorMessage': self.errorMessage
124        }
125        # Remove None values
126        config_dict = {k: v for k, v in config_dict.items() if v is not None}
127
128        # Handle validation function
129        if 'validation' in config_dict and callable(config_dict['validation']):
130            config_dict['validation'] = create_proxy(self.validation)
131
132        return config_dict

Converts the TimePickerConfig into a dictionary format.

class ToggleConfig:
 6class ToggleConfig:
 7    """
 8    Configuration class for the Toggle control.
 9    """
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 hidden: bool = False,
14                 disabled: bool = False,
15                 selected: bool = False,
16                 full: bool = False,
17                 text: str = None,
18                 offText: str = None,
19                 icon: str = None,
20                 offIcon: str = None,
21                 value: Union[str, int, bool] = None,
22                 css: str = None,
23                 height: Union[str, int] = "content",
24                 width: Union[str, int] = "content",
25                 padding: Union[str, int] = None):
26        """
27        Initializes the ToggleConfig.
28
29        :param name: (Optional) The name of the control.
30        :param id: (Optional) The id of the control.
31        :param hidden: (Optional) Whether the toggle is hidden.
32        :param disabled: (Optional) Whether the control is disabled.
33        :param selected: (Optional) Initial state of the toggle as selected.
34        :param full: (Optional) Whether the toggle extends to the specified width.
35        :param text: (Optional) Text inside the toggle.
36        :param offText: (Optional) Text when the toggle is unselected.
37        :param icon: (Optional) CSS class of the icon in the toggle.
38        :param offIcon: (Optional) CSS class of the icon when unselected.
39        :param value: (Optional) Value in the selected state.
40        :param css: (Optional) Adds style classes to the control.
41        :param height: (Optional) The height of the control.
42        :param width: (Optional) The width of the control.
43        :param padding: (Optional) Sets padding between the cell and border.
44        """
45        self.type = "toggle"
46        self.name = name
47        self.id = id
48        self.hidden = hidden
49        self.disabled = disabled
50        self.selected = selected
51        self.full = full
52        self.text = text
53        self.offText = offText
54        self.icon = icon
55        self.offIcon = offIcon
56        self.value = value
57        self.css = css
58        self.height = height
59        self.width = width
60        self.padding = padding
61
62    def to_dict(self) -> Dict[str, Any]:
63        """
64        Converts the ToggleConfig into a dictionary format.
65        """
66        config_dict = {
67            'type': self.type,
68            'name': self.name,
69            'id': self.id,
70            'hidden': self.hidden,
71            'disabled': self.disabled,
72            'selected': self.selected,
73            'full': self.full,
74            'text': self.text,
75            'offText': self.offText,
76            'icon': self.icon,
77            'offIcon': self.offIcon,
78            'value': self.value,
79            'css': self.css,
80            'height': self.height,
81            'width': self.width,
82            'padding': self.padding
83        }
84        # Remove None values
85        return {k: v for k, v in config_dict.items() if v is not None}

Configuration class for the Toggle control.

ToggleConfig( name: str = None, id: str = None, hidden: bool = False, disabled: bool = False, selected: bool = False, full: bool = False, text: str = None, offText: str = None, icon: str = None, offIcon: str = None, value: Union[str, int, bool] = None, css: str = None, height: Union[str, int] = 'content', width: Union[str, int] = 'content', padding: Union[str, int] = None)
10    def __init__(self,
11                 name: str = None,
12                 id: str = None,
13                 hidden: bool = False,
14                 disabled: bool = False,
15                 selected: bool = False,
16                 full: bool = False,
17                 text: str = None,
18                 offText: str = None,
19                 icon: str = None,
20                 offIcon: str = None,
21                 value: Union[str, int, bool] = None,
22                 css: str = None,
23                 height: Union[str, int] = "content",
24                 width: Union[str, int] = "content",
25                 padding: Union[str, int] = None):
26        """
27        Initializes the ToggleConfig.
28
29        :param name: (Optional) The name of the control.
30        :param id: (Optional) The id of the control.
31        :param hidden: (Optional) Whether the toggle is hidden.
32        :param disabled: (Optional) Whether the control is disabled.
33        :param selected: (Optional) Initial state of the toggle as selected.
34        :param full: (Optional) Whether the toggle extends to the specified width.
35        :param text: (Optional) Text inside the toggle.
36        :param offText: (Optional) Text when the toggle is unselected.
37        :param icon: (Optional) CSS class of the icon in the toggle.
38        :param offIcon: (Optional) CSS class of the icon when unselected.
39        :param value: (Optional) Value in the selected state.
40        :param css: (Optional) Adds style classes to the control.
41        :param height: (Optional) The height of the control.
42        :param width: (Optional) The width of the control.
43        :param padding: (Optional) Sets padding between the cell and border.
44        """
45        self.type = "toggle"
46        self.name = name
47        self.id = id
48        self.hidden = hidden
49        self.disabled = disabled
50        self.selected = selected
51        self.full = full
52        self.text = text
53        self.offText = offText
54        self.icon = icon
55        self.offIcon = offIcon
56        self.value = value
57        self.css = css
58        self.height = height
59        self.width = width
60        self.padding = padding

Initializes the ToggleConfig.

Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • hidden: (Optional) Whether the toggle is hidden.
  • disabled: (Optional) Whether the control is disabled.
  • selected: (Optional) Initial state of the toggle as selected.
  • full: (Optional) Whether the toggle extends to the specified width.
  • text: (Optional) Text inside the toggle.
  • offText: (Optional) Text when the toggle is unselected.
  • icon: (Optional) CSS class of the icon in the toggle.
  • offIcon: (Optional) CSS class of the icon when unselected.
  • value: (Optional) Value in the selected state.
  • css: (Optional) Adds style classes to the control.
  • height: (Optional) The height of the control.
  • width: (Optional) The width of the control.
  • padding: (Optional) Sets padding between the cell and border.
type
name
id
hidden
disabled
selected
full
text
offText
icon
offIcon
value
css
height
width
padding
def to_dict(self) -> Dict[str, Any]:
62    def to_dict(self) -> Dict[str, Any]:
63        """
64        Converts the ToggleConfig into a dictionary format.
65        """
66        config_dict = {
67            'type': self.type,
68            'name': self.name,
69            'id': self.id,
70            'hidden': self.hidden,
71            'disabled': self.disabled,
72            'selected': self.selected,
73            'full': self.full,
74            'text': self.text,
75            'offText': self.offText,
76            'icon': self.icon,
77            'offIcon': self.offIcon,
78            'value': self.value,
79            'css': self.css,
80            'height': self.height,
81            'width': self.width,
82            'padding': self.padding
83        }
84        # Remove None values
85        return {k: v for k, v in config_dict.items() if v is not None}

Converts the ToggleConfig into a dictionary format.

class ToggleGroupConfig:
 49class ToggleGroupConfig:
 50    """
 51    Configuration class for the ToggleGroup control.
 52    """
 53    def __init__(self,
 54                 name: str = None,
 55                 id: str = None,
 56                 hidden: bool = False,
 57                 disabled: bool = False,
 58                 full: bool = False,
 59                 gap: int = 0,
 60                 multiselection: bool = False,
 61                 options: List[ToggleOption] = None,
 62                 value: Dict[str, bool] = None,
 63                 css: str = None,
 64                 height: Union[str, int] = "content",
 65                 width: Union[str, int] = "content",
 66                 padding: Union[str, int] = None):
 67        """
 68        Initializes the ToggleGroupConfig.
 69
 70        :param name: (Optional) The name of the control.
 71        :param id: (Optional) The id of the control.
 72        :param hidden: (Optional) Whether the ToggleGroup is hidden.
 73        :param disabled: (Optional) Whether the control is disabled.
 74        :param full: (Optional) Whether the ToggleGroup extends to the specified width.
 75        :param gap: (Optional) Offset between elements.
 76        :param multiselection: (Optional) Allows multiple selection.
 77        :param options: (Required) List of ToggleGroup elements.
 78        :param value: (Optional) Defines the state of elements on initialization.
 79        :param css: (Optional) Adds style classes to the control.
 80        :param height: (Optional) The height of the control.
 81        :param width: (Optional) The width of the control.
 82        :param padding: (Optional) Sets padding between the cell and border.
 83        """
 84        self.type = "toggleGroup"
 85        self.name = name
 86        self.id = id
 87        self.hidden = hidden
 88        self.disabled = disabled
 89        self.full = full
 90        self.gap = gap
 91        self.multiselection = multiselection
 92        self.options = options  # Should be a list of ToggleOption
 93        self.value = value
 94        self.css = css
 95        self.height = height
 96        self.width = width
 97        self.padding = padding
 98
 99    def to_dict(self) -> Dict[str, Any]:
100        """
101        Converts the ToggleGroupConfig into a dictionary format.
102        """
103        config_dict = {
104            'type': self.type,
105            'name': self.name,
106            'id': self.id,
107            'hidden': self.hidden,
108            'disabled': self.disabled,
109            'full': self.full,
110            'gap': self.gap,
111            'multiselection': self.multiselection,
112            'options': [option.to_dict() for option in self.options] if self.options else None,
113            'value': self.value,
114            'css': self.css,
115            'height': self.height,
116            'width': self.width,
117            'padding': self.padding
118        }
119        # Remove None values
120        return {k: v for k, v in config_dict.items() if v is not None}

Configuration class for the ToggleGroup control.

ToggleGroupConfig( name: str = None, id: str = None, hidden: bool = False, disabled: bool = False, full: bool = False, gap: int = 0, multiselection: bool = False, options: List[dhxpyt.form.controls.togglegroup_config.ToggleOption] = None, value: Dict[str, bool] = None, css: str = None, height: Union[str, int] = 'content', width: Union[str, int] = 'content', padding: Union[str, int] = None)
53    def __init__(self,
54                 name: str = None,
55                 id: str = None,
56                 hidden: bool = False,
57                 disabled: bool = False,
58                 full: bool = False,
59                 gap: int = 0,
60                 multiselection: bool = False,
61                 options: List[ToggleOption] = None,
62                 value: Dict[str, bool] = None,
63                 css: str = None,
64                 height: Union[str, int] = "content",
65                 width: Union[str, int] = "content",
66                 padding: Union[str, int] = None):
67        """
68        Initializes the ToggleGroupConfig.
69
70        :param name: (Optional) The name of the control.
71        :param id: (Optional) The id of the control.
72        :param hidden: (Optional) Whether the ToggleGroup is hidden.
73        :param disabled: (Optional) Whether the control is disabled.
74        :param full: (Optional) Whether the ToggleGroup extends to the specified width.
75        :param gap: (Optional) Offset between elements.
76        :param multiselection: (Optional) Allows multiple selection.
77        :param options: (Required) List of ToggleGroup elements.
78        :param value: (Optional) Defines the state of elements on initialization.
79        :param css: (Optional) Adds style classes to the control.
80        :param height: (Optional) The height of the control.
81        :param width: (Optional) The width of the control.
82        :param padding: (Optional) Sets padding between the cell and border.
83        """
84        self.type = "toggleGroup"
85        self.name = name
86        self.id = id
87        self.hidden = hidden
88        self.disabled = disabled
89        self.full = full
90        self.gap = gap
91        self.multiselection = multiselection
92        self.options = options  # Should be a list of ToggleOption
93        self.value = value
94        self.css = css
95        self.height = height
96        self.width = width
97        self.padding = padding

Initializes the ToggleGroupConfig.

Parameters
  • name: (Optional) The name of the control.
  • id: (Optional) The id of the control.
  • hidden: (Optional) Whether the ToggleGroup is hidden.
  • disabled: (Optional) Whether the control is disabled.
  • full: (Optional) Whether the ToggleGroup extends to the specified width.
  • gap: (Optional) Offset between elements.
  • multiselection: (Optional) Allows multiple selection.
  • options: (Required) List of ToggleGroup elements.
  • value: (Optional) Defines the state of elements on initialization.
  • css: (Optional) Adds style classes to the control.
  • height: (Optional) The height of the control.
  • width: (Optional) The width of the control.
  • padding: (Optional) Sets padding between the cell and border.
type
name
id
hidden
disabled
full
gap
multiselection
options
value
css
height
width
padding
def to_dict(self) -> Dict[str, Any]:
 99    def to_dict(self) -> Dict[str, Any]:
100        """
101        Converts the ToggleGroupConfig into a dictionary format.
102        """
103        config_dict = {
104            'type': self.type,
105            'name': self.name,
106            'id': self.id,
107            'hidden': self.hidden,
108            'disabled': self.disabled,
109            'full': self.full,
110            'gap': self.gap,
111            'multiselection': self.multiselection,
112            'options': [option.to_dict() for option in self.options] if self.options else None,
113            'value': self.value,
114            'css': self.css,
115            'height': self.height,
116            'width': self.width,
117            'padding': self.padding
118        }
119        # Remove None values
120        return {k: v for k, v in config_dict.items() if v is not None}

Converts the ToggleGroupConfig into a dictionary format.