Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Data binding GP - Binding to the property of graphic item

Description:
The value of the GP data binding is a value of the graphic item property or its implementation subobject.
Data binding configurators:
Select propertyDefines the graphic item type.
of others graphic items - The "Graphic item" configurator is filled in by clicking on another graphic item.
of this edited graphic item
of parent of this edited graphic item
of the PmiRoot item
Graphic itemRelative or absolute path to the graphic item or its implementation subobject (case sensitive text). The graphic item can also be selected by mouse - the configurator will autocomplete the expression.

The path describes the location of the object in the tree structure of the immersed graphic items. Each tree level adress is separated by the / character. The immersed graphic item is referrenced by its name. The superior graphic item is referrenced by .. characters. The absolute path starts with the / character and describes the path to the graphic item from the beginning of the tree structure. The relative path starts with the name of the immersed item or by reference to superior graphic item by .. characters, or by reference to itself ., describes the path to another graphic item relatively to itself.

The immersed implementation subobject (other than PmObject type) is referrenced by # character, followed by the implementation subobject type definition (e.g. #vars). It means that, the # addressing leaves the panel graphic items tree and starts to address the implementation subobjects. For example "/text0/#vars/Temperature".

#vars - Enables the variables of the graphic item. The graphic item variable is used as aid for creation of user added item properties.

The variable is an Object type. This object has only a single property Value, representing the value of variable itself. Property access for read and write.

The variable of graphic item can be reached by two ways:

1) From the graphic item by the Vars method. For example pMe.Items("/text0").Vars("Temperature").Value
2) By setting the path to the graphic item extended by access to implementation object by #vars. For example pMe.Items("/text0/#vars/Temperature").Value

Note! The way of entering the path down to the specific variable of a graphic item can be used in the PmiItem.Items method, in GP binding and also in #pragma variable x = PmiItemRef("path").

Macro expression can be used for input (it is evaluated while the window is opening).

PropertyName of the graphic item property over which the data binding has to be created.

Macro expression can be used for input (it is evaluated while the window is opening).

Dynamic propertyCheck only in special cases:

Check only when the EXPRESSION is written in "Property" configurator, (e.g. acx.Trends(0).Color) and when the object (in this case the object Trends(0) in the ActiveX object referenced in the "Graphic item" configurator) can be removed and created in runtime.

DON'T check, if only the name of elementary property is written in the property row, e.g. X, visible, acx.BackgroundColor, etc..

Note:
This data binding is also functional for Web Panels. The evaluation of the data binding does not need to communicate with the WEB server (with PROMOTIC application) - the evaluation is done on the client side (i.e. on the WEB browser).
See also:
Example1:
Binding to the Value property of the PmiText item with the text0 name that is nested into the PmiPanel item with the panel0 name. The reference to the item is absolute.

Graphic item: /panel0/text0

Property: Value

Example2:
Binding to the Value property in my own PmiText item. The reference to such item is relative.

Graphic item: .

Property: Value

Example3:
Binding to the Value property of the superior item PmiText. The reference to such item is relative.

Graphic item: ..

Property: Value

Example4:
In the PmiText item with the text0 name nested into the parent item with the panel0 name the data binding is linked to the Value property of the text1 item also nested into the panel0 item. The reference to such item is relative.

Graphic item: ../text1

Property: Value

Example5:
Binding to the variable named Temperature created in my own item. See: Variables. The reference to such item is relative.

Graphic item: ./#vars/Temperature

Property: Value

or obsolete

Graphic item: .

Property: Vars("Temperature").Value

Example6:
Binding to the variable named Temperature created in the parent item. See: Variables. The reference to such item is relative.

Graphic item: ../#vars/Temperature

Property: Value

or obsolete

Graphic item: ..

Property: Vars("Temperature").Value

Example7:
Binding to the PmTable.FocusedRow property configured in the PmiAx item with the Ax0 name.

Graphic item: /Ax0

Property: Acx.FocusedRow

© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice