Vars - method of the PmgObject object
Object Vars(String sName)
oItem.Vars(sName).Value = x
|sName||(String) Name of the Pmg object variable (case sensitive text)|
The Pmg object variables are defined on the "Variables" tab.
This method is also functional in Web panels.
object variable can be obtained also directly by the Items
method by using the extended path input via #vars
//Setting the numeric value into the property of the types Double, Integer, Boolean, etc.
oItem.Vars("Numvar").Value = 1;
//Setting the color into the Colorvar variable of the Color type.
oItem.Vars("Colorvar").Value = "#ff0000";
//Setting the font into the Fontvar variable of the Font type.
oItem.Vars("Fontvar").Value = "PmSmallBold";
: (Changed to object.) of the Pmg
object now does not return the value of the object variable, but returns an object representing such variable. Only the Vars.Value
property returns the variable value. This modification allows to write into the variables also in the Web panel