TreeGetCurItemLevelProperty method (WinStudio scripts)

Applies To

IWSFormComponent interface, tree objects

Definition

Returns a property value in a parent node relative to the current node.

Syntax

object.TreeGetCurItemLevelProperty( l evelIndex, propertyIndex )

  Part   Description
object Required. A reference to a valid tree component object.
levelIndex Required. Integer. A zero-based index corresponding to a level above the current level in a tree component.
propertyIndex Required. Integer. A zero-based index of a property in a node. Properties are counted from left to right as they appear in the data-binding specifications in WinStudio.

Example

Sub Main()
    Dim intPropIndex, intLevelIndex As Integer
    Dim strProp As String
    'Set the property index to point to the first property in a node.
    intPropIndex = 0
    'Set the level index to point to the parent of the current node.
    intLevelIndex = ThisForm.Components("OrdersTree").TreeGetCurLevel() - 1
    'Get the value of the first property in the parent node.
    strProp = ThisForm.Components("OrdersTree").TreeGetCurItemLevelProperty(intLevelIndex, intPropIndex)
    Application.ShowMessage(strProp)
End Sub
Related topics