method getStyle

styleVariant getStyle(string aname);

Argumente

Zurückgegebener Wert

This method returns the value for a given style as a style variant. If not found returns an empty variant. See the StyleVariant for more information.
function CopyStyle()
{
    var containerBox = scene.getBoxById("containerBox");
    var targBox = scene.getBoxById("otherContainer");
    if (containerBox && targBox)
    {
        var fillStyle = containerBox.getStyle("fill");
        targBox.setStyleVal("fill", fillStyle);
    }
}