Image size

Jan Hein Liebregts 8 years ago in iRidium Script / Interface scripts updated by Oksana (expert) 6 years ago 2
When I have an javascript with:
[font=courier]IR.GetItem("Page 1").GetItem("Button").GetState(0).Image = "pict.jpg";
It ads an image to the button.
When I ad:
IR.GetItem("Page 1").GetItem("Button").Width = 500;
IR.GetItem("Page 1").GetItem("Button").Height = 100;
It changes the button size, but not the image size.
How can I change the image size in the javascript?
Jan Hein
Hello Jan!

You can not change image size with script, but you can change image size with item property "image stetch" = propoptional (or full size).  if property image stetch = prooportional (or full size) then image auto change size after set.

how change property image stretch? select item, open object properties panel, select tab states and find this property.