Search the Community
Showing results for tags 'Treeviewitem'.
Found 1 result
I am trying to pull information from different files. They will all be grouped together by name. In treeview I would have Last Name << This labels would be the actual name. -First Name -Address -Phone Number I currently have the above information saved into 4 different ini files. I am writting the values as Section Keys. Like so: IniWriteSection(@ScriptDir & "\First Name.ini", GUICtrlRead($Name),"") Then read it into an array such as Local $Name2 = IniReadSectionNames(@ScriptDir & "\First Name.ini") For $I = 1 To $Name2 GUICtrlSetData(-1, $Name2[$I] & "|") Next The problem is I can not get the separate values into the TreeView based on what last name is selected. Here is what I have so far: Onlastnamesearch("CueClub") Func Onlastnamesearch($LastName) GUICreate("Notes for " & $LastName, 300, 250, -1, -1, "", $WS_EX_TOPMOST) GUICtrlCreateLabel("LAST NAME", 5, 10, 60, 40) Local $Tmp = IniReadSectionNames(@ScriptDir & "\Last Name.ini") Local $Tmp2 = GUICtrlCreateTreeView(5, 50, 170, 100) For $I = 1 To $tmp $tmp3 = GUICtrlCreateTreeViewItem($tmp[$i], $Tmp2) $FirstName = GUICtrlCreateTreeViewItem("First Name", $Tmp3) $Address = GUICtrlCreateTreeViewItem("Address", $Tmp3) $PhoneNumber = GUICtrlCreateTreeViewItem("Phone Number", $Tmp3) Next Local $exit = GUICtrlCreateButton("Exit", 5, 160, 50, 20) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $exit Or $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete() EndFunc ;==>Example As you can see above, I can get the treeview to populate, and even the tree items, However I am stumped as to how to pull the data from the separate ini files and display them based on what is clicked on the treeview. I have read the help file, and searched here a bit, but it is a bit confusing for me. Any help would be appreciated. CC