Skip to main content

setProperties()

allows changing available configuration attributes of the control dynamically

setProperties(properties: object): void;

Parameters:

  • properties: object - an object with the available attributes of the control and their new values

Example

form.getItem("combo").setProperties({
label: "New label",
labelPosition: "top"
});
info

The method invokes the afterChangeProperties and beforeChangeProperties events.

It is possible to change values of the following configuration attributes of the Combo control:

{
css: string,
errorMessage: string,
filter: function,
height: string|number|"content",
helpMessage: string,
hiddenLabel: boolean,
itemHeight: number,
itemsCount: boolean | function,
label: string,
labelPosition: string,
labelWidth: string|number,
listHeight: number,
multiselection: boolean,
padding: string|number,
placeholder: string,
preMessage: string,
readOnly: boolean,
required: boolean,
selectAllButton: boolean,
successMessage: string,
template: function,
validation: function,
virtual: boolean,
width: string|number|"content"
}

You will find the description of these properties here.

Change log:

added in v7.0