DEF MyCWVar1 = (W///,"slestestcustomwidget.SlEsTestCustomWidget")
END_PRESS
7.4.5.2 Executing a method of the custom widget
Description
The function CallCWMethod is available in the Run MyScreens configuration for executing
methods of the custom widget.
The custom widget method to be called must have no more than 10 transfer parameters.
The following transfer parameter data formats are supported:
● bool
● uint
● int
● double
● QString
● QByteArray
Programming
Syntax: CallCWMethod
("Variablename", "Methodname[, Argument 0][, Argument 1 …
[,Argument 9]")
Description: Calling a custom widget method
Parameters:
Variable name Name of a dialog box variable to which a custom widget
is assigned
Method name Name of the custom widget name to be called
Argument 0 - 9 Transfer parameter for the custom widget method
Supported data formats: see above
Note: The transfer parameters are always transferred
with "ByVal," i.e. only the value is transferred and not,
for example, the reference to a variable.
Return value: Return value of the custom widget method
The following transfer parameter data formats are supported:
● void
● bool
● uint
● int
● double
● QString
● QByteArray
Note: Even if the data format of the return value of the custom widget method
is "void," it must be formally assigned to a variable, for example.
Graphic and logic elements
7.4 Custom widgets
SINUMERIK Integrate Run MyScreens (BE2)
212 Programming Manual, 12/2017, 6FC5397-1DP40-6BA1