SizeChanged: function (sender, args);
sender. Event source.
args. Event information.
The SizeChanged event is fired after component is resized.
To execute the example, connect the PP.js library and the PP.css visual styles table. Create a button and change its width. Add handlers for the SizeChanged and Control.SizeChanging events:
button = new PP.Ui.Button({ ParentNode: document.body, Content: "Button" }); button.SizeChanging.add(function () { console.log(button.getWidth()) }); button.SizeChanged.add(function () { console.log(button.getWidth()) }); button.setWidth(70);
After the example execution a Button is created and its width is changed. Value of the button width before and after the change is displayed to the browser console.
See also: