Elementos gráficos y lógicos
9.5 SlEsGraphCustomWidget
Por motivos de rendimiento, no se actualiza automáticamente la visualización. Según el caso de
aplicación, puede forzarse la actualización activando una función determinada.
Ejemplo
Figura 9-1
//M(MyGraphSampleMask/"SlEsGraphCustomWidget Sample")
DEF MyGraphVar = (W///,"slesgraphcustomwidget.SlEsGraphCustomWidget"/////10,10,340,340/0,0,0,0)
VS1=("Add objects",,se1)
LOAD
WRITECWPROPERTY("MyGraphVar", "AxisNameX", "X")
WRITECWPROPERTY("MyGraphVar", "AxisNameY", "Y")
WRITECWPROPERTY("MyGraphVar", "ScaleTextOrientationYAxis", 2)
WRITECWPROPERTY("MyGraphVar", "KeepAspectRatio", TRUE)
REG[0]= CALLCWMETHOD("MyGraphVar", "addContour", "MyContour", TRUE)
REG[0]= CALLCWMETHOD("MyGraphVar", "showContour", "MyContour")
REG[0]= CALLCWMETHOD("MyGraphVar", "setView", -35, -35, 150, 150)
END_LOAD
PRESS(VS1)
REG[0]= CALLCWMETHOD("MyGraphVar", "addLine", 10, 20, 40, 20)
REG[0]= CALLCWMETHOD("MyGraphVar", "addLine", 40, 20, 40, 40)
REG[0]= CALLCWMETHOD("MyGraphVar", "addLine", 40, 40, 60, 40)
REG[0]= CALLCWMETHOD("MyGraphVar", "addLine", 80, 0, 80, 100)
REG[0]= CALLCWMETHOD("MyGraphVar", "addLine", 90, 0, 90, 100)
REG[0]= CALLCWMETHOD("MyGraphVar", "addRect", 25, 100, 50, 75)
REG[0]= CALLCWMETHOD("MyGraphVar", "setPenColor", "#ff0000");red
REG[0]= CALLCWMETHOD("MyGraphVar", "setFillColor", "#ffff00");yellow
REG[0]= CALLCWMETHOD("MyGraphVar", "addCircle", -12.5, 62.5, 12.5)
244
SlEsGraphCustomWidget: ejemplo
SINUMERIK Integrate Run MyScreens
Manual de programación, 07/2022, A5E50479473E AC