method getStyle

styleVariant getStyle(string property);

Argumente

Zurückgegebener Wert

This method returns the value of a given style in the form of a StyleVariant. See the StyleVariant class documentation for more information.
function onTest()
{
    var library = shell.getLibrary("../theme/toolkit.box");
    if (library)
    {
        var bitmap = library.getResourceById("myBmp");
        if (bitmap)
        {
            var style = bitmap.getStyle("width");
            if (style)
            {
                shell.print("width = " + style.intValue);
            }
        }
    }
}