method getPartById

box getPartById(string partId);

Argumente

Zurückgegebener Wert

This method returns the gadget part with the give id. If no part is found with the given id, null is returned.
function DoChange()
{
    var bx = scene.getBoxById("myButton");
    if (bx)
    {
        var part = bx.getPartById("label");
        if (part)
            part.setAttribute("dataValue", "customValue");
    }
}