setValue

sets a new value for the component

void setValue(string|number|boolean value);

Parameters

valuestring|number|booleana new value for the control

Example

webix.ui({
    view:"toggle", 
    id: "mytoggle",
    offLabel:"Disabled", 
    onLabel:"Enabled" 
});
 
$$("mytoggle").setValue(1); // enables control initially

See also
Back to top