BlockUpdateSize: Boolean
The BlockUpdateSize property determines whether blocking of component resizing is enabled.
If the BlockUpdateSize property is set to True, resizing blocking is active. By default the property is set to False.
To execute the example, connect the PP.js components library and the PP.css visual styles table. Create a TabControl component that consists of a single tab. Create two HTML buttons. Clicking one of these button changes component width. Clicking the second button component resizing is blocked.
<body>
<div id="tabcont1"></div>
<!--Button that blocks component resizing-->
<button onclick="tabcontrol.setBlockUpdateSize(true);">BlockUpdateSize</button>
<!--Button that resizes the component-->
<button onclick="tabcontrol.setWidth(200);">updateSize</button>
<script type="text/javascript">
//Create the TabControl component:
var tabcontrol = new PP.Ui.TabControl({
//ID for the tag div
ParentNode: document.getElementById("tabcont1"),
Width: 300,
Height: 200
});
//Add a tab to the TabControl component:
tabcontrol.addItem(new PP.Ui.TabItem({ Position: PP.LTRB.Top, Caption: "Tab" }));
</script>
</body>
After executing the example the TabControl component that includes a tab named Tab and two buttons are placed on the HTML page. Clicking the updateSize button changes component width. If the BlockUpdateSize button has been clicked before clicking the updateSize button, the component size remains unchanged.
See also: