Almost all properties that are shown in the HMWIN Studio
Properties
pane can be retrieved using the
getProperty
method. The index value is optional and only used for widgets that support arrays.
function buttonStd1_onMouseRelease(me, eventInfo) {
var shape = page.getWidget("rect2");
var y_position = shape.getProperty("y");
}
function buttonStd2_onMouseRelease(me, eventInfo) {
var image = page.getWidget("multistate1");
var image3 = image.getProperty("imageList", 2);
//…
}
(Available on web pages)
setProperty
boolean setProperty( propertyName, value, [index] )
Sets a property for the widget.
Parameters
Parameter
Description
propertyName
String containing the name of property to set
value
String containing the value to set the property.
index
Index of the element to set in the array (default = 0)
Almost all properties that are shown in the HMWIN Studio
Properties
pane 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);
//…
}
(Available on web pages)
HMWIN Studio | User Manual | v206 (2017-06-30) | EN | © 2014-2017 Panasonic Electric Works Europe AG
351
35 JavaScript
Summary of Contents for HMWIN
Page 166: ...164 HMWIN Studio User Manual v206 2017 06 30 EN 2014 2017 Panasonic Electric Works Europe AG ...
Page 258: ...256 HMWIN Studio User Manual v206 2017 06 30 EN 2014 2017 Panasonic Electric Works Europe AG ...
Page 380: ...378 HMWIN Studio User Manual v206 2017 06 30 EN 2014 2017 Panasonic Electric Works Europe AG ...
Page 439: ......