Control.SizeChanged

Syntax

SizeChanged: function (sender, args);

Parameters

sender. Event source.

args. Event information.

Description

The SizeChanged event is fired after component is resized.

Example

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 executing the example a button named 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:

Control