Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Items - method of object PmPanel

Description:
Returns reference to the graphic item in the panel.

Using this method is not recommended. It is not proper to make references to graphic items outside the panel that contains the graphic item (one of the problems is that such thing does not work in WEB panel). In order to obtain the reference to panel item (in panel events) it is recommended to use the PmiItem.Items method.

This method/property/event is considered obsolete and is functional only if the Level of integration of panel viewer and the local application configurator is set to full - FULL access from scripts to the whole application (only for VBScript value and if the Enable multiple opening of local panel configurator IS NOT SET.

Instead of this property it is recommended to use the PmiItem.Items property.

Syntax:
Items(sPath As String, [nAttr As Long]) As Object
Calling:
Set oItem = oPanel.Items(sPath)
Parameters:
sPath(String) Absolute path to the graphic item (case sensitive text).

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".

nAttr[optional] (Long) Enables to change the behavior of the method.
0 (default) - default behavior.
1 - when referencing the non-existent graphic item the global error in the INFO system won't be generated.
Note:
Using this method over the PmPanel object is not recommended (it is not functional for example for Web panels). It can be used properly only if the graphic items need to be affected directly from the application tree. Usually (e.g. in graphic item events) it is much better to use the PmiItem.Items method, i.e. to reach the graphic item through another graphic item.

For example see the PmiItem.Items method.

 
In order to create the Object type variable containing reference to graphic item or its implementation subobject. See also: #pragma variable x = PmiItemRef("path").
Example:
Writing the 0 value into the variable "Temperature" of the "text0" graphic item immersed into the superior item named panel0. The reference to the item is absolute.Writing the 0 value into the variable "Temperature" in my own graphic item. The reference to the item is relative.Writing the 0 value into the variable "Temperature" in superior graphic item. The reference to the item is relative.Writing the 0 value into the variable "Temperature" of the "text1" graphic item immersed into my superior graphic item. The reference to the item is relative.
pMe.Pm("/Panel").Items("/text0/#vars/Temperature") = 0
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice