Panasonic HMWIN User Manual page 268

Touch
Hide thumbs Also See for HMWIN:
Table of Contents

Advertisement

}
setProperty
boolean setProperty( propertyName, value, [index] )
Sets a property for the Widget
Parameters
propertyName
value
index
Almost all properties that are shown in the HMWIN Studio Property view can be set by this method. The
index value is optional and only used for Widgets that support arrays (for example a MultiState Image
widget). The setProperty method returns a boolean value true or false to indicate if the property was
set or not.
function buttonStd1_onMouseRelease(me, eventInfo) {
var setting_result = shape.setProperty("y", 128);
if (setting_result)
alert("Shape returned to start position");
}
function buttonStd2_onMouseRelease(me, eventInfo) {
var image = page.getWidget("multistate1");
var result = image.setProperty("imageList", "Fract004.png", 2);
//...
}
34.3.2 Page
This object references the current HMI page. The page is the top-level object of the screen.
Follow the list of Page Object Properties:
backgroundColor
string backgroundColor (in format rgb(xxx, xxx, xxx) where xxx range from 0 to
255)
The page background color
function btnStd11_onMouseRelease(me) {
page.backgroundColor = "rgb(128,0,0)";
}
width
number width
The Page width in pixels
function btnStd05_onMouseRelease(me) {
var middle_x = page.width / 2;
}
height
ACGM0195V1EN
HMWIN Studio User Manual
A string containing the name of property to set.
A string containing the value to set the property.
The index of the element to set in the array. Default is 0.
268

Advertisement

Table of Contents
loading

Table of Contents