StackPanel.beginUpdate

Syntax

beginUpdate ()

Description

The beginUpdate method stops component drawing.

Comments

On using the beginUpdate method, subsequent commands that change parameters will not cause immediate update of the component. Use the StackPanel.endUpdate method for the changes to take effect.

Example

To execute the example, create a StackPanel component named stackPanel and add elements to the component (see description of the StackPanel constructor). In the BODY tag add the DIV items with the but1 and but2 identifiers. Add the Begin Update and End Update buttons:

        var but1 = new PP.Ui.Button(
        {
            Content: "begin update",
            ParentNode: document.getElementById("but1"),
            Click: begin
        })
         var but2 = new PP.Ui.Button(
        {
            Content: "end update",
            ParentNode: document.getElementById("but2"),
            Click: end
        })
            function begin()
            {
                stackPanel.beginUpdate();
                stackPanel.setHeight(200);
                stackPanel.setWidth(250)             }             function end()             {                 stackPanel.endUpdate();             }

After executing the example clicking the Begin Update button resizes the component:

Next click the End Update button to rerender the component:

See also:

StackPanel