define

redefines a single configuration property (or a hash of properties)

void define(string property,any value);

Parameters

propertystringthe property name or a hash of properties that need redefining
valueanythe new property value

Example

// redefines the width of the list
$$("mylist").define("width", 300);
$$("mylist").resize();
 
// changes the label of the button
$$("button1").define("label", "New value");
$$("button1").refresh();
 
// changes multiple properties at once
$$("text2").define({
    value:"123",
    label:"New label"
});
$$("text2").refresh();

Related samples

Details

The component should be refreshed to reflect the changes.

Redefining "config" object

You can also use the config property to change the desired configuration option:

$$("myList").config.width = 300:
$$("myList").resize();
See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix javascript ui library and page of javascript open new window product.