Knowledgebase:
GetTreeData
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 18 July 2017 01:13 PM

Syntax

Public Function GetTreeData(formID As String, TreeName As String, prop_Id As ENUM_GUI_TREE_DATA, ByRef prop_Value As String, Optional Index As Integer = 1) As Boolean

This function is used to get node count for a specific tree (GUI control).

Parameters

Key  Description 
formID Form identifier, must be a number greater than 3000 and less than 10,000
TreeName Tree identifier, value of type String.
prob_Id porperty to get its value. Value can be one of the ENUM_GUI_TREE_DATA
prob_Value To hold the returned value, value of type String
Index The index of tree node, Optional value of type Integer.

Return value

Returns true if the GUI control (tree) data has been returned to the specified property. Otherwise, returns false. In order to get an error, call GetLastError() function

Sample

 

Public Sub main()

  ''''TODO: Script program start method 

  dim frmID,Tdata,Ndata

  frmID = "3450"

  CreateVTLForm CLng(frmID),false,CSTR("Tree View")

  CreateVTLControl CSTR(frmID),"treeV",GUI_TREE_VIEW


  'set Form GUI properties

  SetGUIObject CSTR(frmID),"",GUI_PROPERTY_HEIGHT, 3000

  SetGUIObject CSTR(frmID),"",GUI_PROPERTY_WIDTH, 9000
 

  'set Tree View GUI Settings

  SetGUIObject CSTR(frmID),CSTR("treeV"),GUI_PROPERTY_HEIGHT, 2000

  SetGUIObject CSTR(frmID),CSTR("treeV"),GUI_PROPERTY_WIDTH,8000

  SetGUIObject CSTR(frmID),CSTR("treeV"),GUI_PROPERTY_TOP,10

  SetGUIObject CSTR(frmID),CSTR("treeV"),GUI_PROPERTY_LEFT,10
 

  SetTreeData CSTR(frmID),"treeV",TREE_ADD_NODE,CSTR(""),false,CSTR("Root"),CSTR("Root")

  SetTreeData CSTR(frmID),"treeV",TREE_ADD_NODE,CSTR("Root"),true,CSTR("Child"),CSTR("Child")

  SetTreeData CSTR(frmID),"treeV",TREE_ADD_NODE,CSTR(""),false,CSTR("Root2"),CSTR("Root2")

  SetTreeData CSTR(frmID),"treeV",TREE_ADD_NODE,CSTR("Root2"),true,CSTR("Child2"),CSTR("Child2")

  SetTreeData CSTR(frmID),"treeV",TREE_ADD_NODE,CSTR("Child2"),true,CSTR("Child3"),CSTR("Child3")
 

  GetTreeData CSTR(frmID),"treeV",TREE_COUNT,CSTR(Tdata)

  AlertMessage "Tree Count = " & CSTR(Tdata)
 

  SetTreeNode CSTR(frmID),"treeV",NODE_CHECKED,true,CINT(1) 

  GetTreeNodeData CSTR(frmID),CSTR("treeV"),TREE_NODE_ROOT,CSTR(Ndata)

   AlertMessage Ndata

End Sub

 

 


See Also


Back to VTL Client Script Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions