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, doesn't 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: It is often necessary to ensure that instances created from the same prototype are slightly different. There can be for example different texts, bindings to values ... 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 the configurators 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).
|onFocusIn||Is triggered if the object receives focus|
|onFocusOut||Is triggered if the object loses focus|
|onKeyPress||Is triggered after pressing or releasing the key of the keyboard|
|onMenuFill||Is triggered after pressing by the right mouse button over the Pmg object|
|onMenuSelect||Is triggered on the selection of an item from the Pmg object local menu|
|onModeChange||Is triggered when the Pmg object mode changes|
|onMousePress||Is triggered after pressing or releasing the left mouse button|
|onRefresh||Is triggered on the data refresh of the Pmg object|
|onStart||Is triggered on the construction of the Pmg object in the course of opening the panel|
|onStop||Is triggered on the destruction of the Pmg object in the course of closing the panel|
|Object||General information about the object|
|Content||Content of the Pmg object in the XML form|
|Position||Setting the position, width and height of the Pmg object|
|Variables||List and configuration of user defined Pmg object variables|
|Events||Algorithms definition for the object events|
|Methods||Definition of designer's method of the Pmg object|
|Panel||Setting the background area of the Pmg object|