Panasonic HMWIN User Manual page 267

Touch
Hide thumbs Also See for HMWIN:
Table of Contents

Advertisement

number opacity (range from 0 to 1)
It gets or sets the Widget opacity. Values are decimals from 0 to 1, where 1 is 100% opaque.
function btnStd8_onMouseRelease(me) {
var wgt = page.getWidget("rect1");
wgt.opacity = 0.5;
}
rotation
number rotation (in degrees)
It gets or sets the rotation angle for the Widget. The rotation is done by degree and makes a clockwise
rotation, starting at the East position.
function btnStd9_onMouseRelease(me) {
var wgt = page.getWidget("rect1");
wgt.rotation = 45;
}
userValue
string userValue
It gets or sets a user-defined value for the Widget. This field can be used by JavaScript functions to store
additional data with the Widget.
function btnStd9_onMouseRelease(me) {
var wgt = page.getWidget("rect1");
wgt.userValue = "Here I can store custom data";
}
Every widget has some specific properties that you can access using dot notation. For an up-to-date and
detailed list of properties you can use the Qt Script Debugger inspecting the widget methods and properties.
The following methods are common among all widgets:
getProperty
object getProperty( propertyName, [index] )
Returns a property
Parameters
propertyName
index
Almost all properties that are shown in the HMWIN Studio Property view can be retrieved from 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);
//...
ACGM0195V1EN
HMWIN Studio User Manual
A string containing the name of property to get.
The index of the element to get from the array. Default is 0.
267

Advertisement

Table of Contents
loading

Table of Contents