Object PmgPrototype (Prototype)

The object represents a graphic prototype (template of graphic instances), where multiple Pmg objects can be inserted. It is similar to the PmgBox object, but the difference is that it exists only in the development environment. It is used as a temlate for creating copies of the content of the prototype, by the PmgInstance object, that represents the instance of such prototype content.
The simplified idea of PmgPrototype and PmgInstance objects functionality is that when the panel is being compiled, the content of the prototype is copied into all corresponding instances, that use this prototype.
The main advantage of the prototype-instance concept is that any modification done to the prototype will be applied to all instances automatically. The content of the original prototype exists only in the development environment, does not exist in the running application. Only the prototype copies exist in all corresponding instances. The PmgPrototype object cannot be selected in the graphics editor (as other Pmg objects can). This object is selected (or created) always in the PmgInstance object by filling in the "Prototype name" configurator.
Parameterized prototypes: Usually is necessary to ensure that instances created from the same prototype are slightly different. There can be for example different texts, data bindings ... For this purpose the Parameters of the Pmg object can be used, by defining a set of parameters and then the specific instance sets the real value of these parameters, valid for the corresponding instance. For defining the parameters of the PmgPrototype and PmaInstance objects serves the "Pmg object parameters" configurator. For reference to the Pmg object parameters the Macro expression $.par can be used in configurators of the object and for the scripts the PmgObject.GetPar method can be used. The important fact for detecting the parameter value is that when detecting the value of a specific parameter, the parameter is searched from the current object through the parents by a cascade way (bubbling).
This object inherits properties, methods and events of the PmgBox object.
Properties and methods inherited from the PmgBox object:
BorderTypeType of the box border
BorderWidthWidth of the box border
ColorDarkDark color of the 3D Pmg object border
ColorItemBackground color of the box
ColorLightLight color of the 3D Pmg object border
Events inherited from the PmgObject object:
onStartIs triggered on the construction of the Pmg object in the course of opening the panel
onStopIs triggered on the destruction of the Pmg object in the course of closing the panel
onRefreshIs triggered on the data refresh of the Pmg object
onKeyPressIs triggered after pressing or releasing the key of the keyboard
onMousePressIs triggered after pressing or releasing the left mouse button
onMenuFillIs triggered after pressing by the right mouse button over the Pmg object
onMenuSelectIs triggered on the selection of the item from the Pmg object local menu
onModeChangeIs triggered when the Pmg object mode changes
onFocusInIs triggered if the object receives focus
onFocusOutIs triggered if the object loses focus
Configuration tabs:
ObjectGeneral information about the object
PositionSetting the position, width and height of the Pmg object
VariablesList and configuration of user defined Pmg object variables
EventsAlgorithms definition for the object events
MethodsDefinition of designer's method of the Pmg object
BoxSetting the background area of the Pmg object

Pm9.00.00: Object name changed: PmiPrototype -> PmgPrototype
Pm8.03.24: Configurators "Disable object in runtime etc. moved from the prototype into the instance. It is now possible to disable each instance separately.
Pm8.03.11: Bugfix of $.par macro expression evaluation in Pmg objects PmgInstance and PmgPrototype.
Pm8.02.00: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.