Using Resource Names with Script for Views
To modify the resource associated with a given Views object (whether a color, a pattern, a line or fill style, an arc mode, and so on) use its name. Here are a few examples:
myButton.foreground = "red";
myButton.pattern = "solid";
myLabel.alignment = "right";
Resource names are listed in Resource Names .