setProperties()
allows changing available configuration attributes of the control dynamically
setProperties(propertyConfig: IButtonProps): void;
Parameters:
properties: object
- an object with the available attributes of the control and their new values
Example
form.getItem("button").setProperties({
size: "small",
view: "link"
});
The method invokes the afterChangeProperties and beforeChangeProperties events.
It is possible to change values of the following configuration attributes of the Button control:
text | (string) the text label of a button |
submit | (boolean) enables the button to send form data to a server |
url | (string) the URL the post request with form data will be sent to (if the submit property is set to true) |
width | (string|number|"content") the width of a control |
height | (string|number|"content") the height of a control |
css | (string) adds style classes to a control |
icon | (string) an icon of the button |
view | (string) defines the look of a button: "flat"|"link" |
size | (string) defines the size of a button: "small"|"medium" |
color | (string) defines the color scheme of a button: "danger"|"secondary"|"primary"|"success" |
full | (boolean) extends a button to the full width of a form |
circle | (boolean) makes the corners of a button round |
loading | (boolean) adds a spinner into a button |
padding | (string|number) sets padding between a cell and a border of a button control |
Change log:
added in v7.0