BackgroundPictureKeepAspectRatio – scale background picture and keep aspect ratio
Syntax: ReturnValue = ReadCWProperty(
TouchButtonVarName
, "BackgroundPicture‐
KeepAspectRatio")
WriteCWProperty(
TouchButtonVarName
, "BackgroundPictureKeepAspectRa‐
tio",
Value
)
Description: Reads/sets, whether, when scaling (property "ScaleBackgroundPicture" =
"TRUE") the aspect ratio of the background picture should be kept or not.
Parameter: TouchButtonVar‐
Name
Name of the display variable that contains a SlEsTouch‐
Button
Return value read value of the property (bool)
Value value to be set (bool): TRUE (default) or FALSE
Note
See Chapter Positioning and aligning picture and text (Page 269).
7.6.4 Functions
You can call the subsequently listed functions using the CallCWMethod() function.
Example
Setting the margins of the SlEsTouchButton linked using display variable "MyTouchButton".
The result is written to register 0.
REG[0] = CallCWMethod("MyTouchButton", "setMargins", 20, 20, 20, 20,
20)
Overview
Function Description
setMargins Setting the margins
serialize Saves/restores the actual state
setMargins – setting the margins
Syntax: ReturnValue = CallCWMethod(
TouchButtonVarName
, "setMargins",
left
,
top,
right
,
bottom
,
center
)
ReturnValue = CallCWMethod(
TouchButtonVarName
, "setMargins",
left
,
top
,
right
,
bottom
,
center
,
marginAlignment
)
Description: Using this function, the margin clearances and the distance between picture and
text are defined.
If a value of "-1" is specified, then this value is applicable for the system default
clearance. If the value is greater or equal to "0", then the value is set as edge
clearance.
Graphic and logic elements
7.6 SlEsTouchButton
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 12/2017, 6FC5397-1DP40-6BA1 265