getProperties()
returns an object with the available configuration attributes of the control
getProperties(id?: string): object;
Parameters:
id: string
- optional, the id of a toggle
Returns:
An object either with the available attributes of the control and their values, or with the available attributes of the toggle and their values
Example
const form = new dhx.Form("form_container", {
rows: [
{
id: "toggleGroup",
name: "align",
type: "toggleGroup",
value: {
"left": true,
},
options: [
{
id: "left",
icon: "dxi dxi-format-align-left",
},
{
id: "center",
icon: "dxi dxi-format-align-center",
value: "center",
},
{
id: "right",
icon: "dxi dxi-format-align-right",
value: 1,
}
]
},
]
});
// return the object of the ToggleGroup control
form.getItem("ToggleGroup").getProperties();
// return the object of a toggle of the ToggleGroup control
form.getItem("ToggleGroup").getProperties("second");
The returned object of the ToggleGroup control looks like:
{
css: "",
full: false,
gap: 0,
height: "content",
multiselect: false,
options: [
{id: 'left', icon: 'dxi dxi-format-align-left', value: 1},
{id: 'center', icon: 'dxi dxi-format-align-center', value: 'center'},
{id: 'right', icon: 'dxi dxi-format-align-right'},
{id: 'space', icon: 'dxi dxi-format-line-spacing', disabled: true}
],
padding: "",
width: "content"
}
You will find the description of all these properties here.
The returned object of a toggle of the ToggleGroup control looks like:
{
full: false,
icon: "",
offIcon: "",
offText: "",
text: "Toggle 1",
value: undefined
}
You will find the description of all these properties here.