WinStudio
IWSFormComponent interface, tree objects
Returns a property value in a parent node relative to the current node.
object.TreeGetCurItemLevelProperty( LevelIndex, 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. |
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