03-02-2021, 03:17 AM
I'm a new QM user, but I'm finding my way around pretty well and liking what I see. I use macros extensively. I'm a bit stuck on a SysTreeView though. When I search for an element, it seems to be searching from the top. I'm trying to figure out how to tell the App.Find to start searching from a given tree element.
I have a tree that has multiple occurrences of a given text. For example
+ Device A
+ Interfaces
+ Port 0
- IP Address
+ Device B
+ Interfaces
+ Port 0
- IP Address
I'm oversimplifying on purpose... But here's what is going on. I first find the Device that i'm looking for. Say it's Device B in this case. I do something like this:
int w3=win("Gadgets" "Afx:*" "" 0x4)
Acc a3.Find(w3 "OUTLINEITEM" "Device B" "class=SysTreeView32[]id=59648" 0x1035)
act w3
act a3
int c3 = child(a3)
SendMessage c3 LVM_ENSUREVISIBLE a3.elem-1 0 ;; scroll to the location
a3.Select(3) ;; select and focus
Then I want to find the IP Address element of that particular device. But when I do the following, it almost always finds a leaf element of a different device somewhere higher in the tree. In this case, I have about 150 devices and each device has about 30 top level children and about a total of 1500 leaf parameters. I just want to tell the "Find" to start at the "selected" object.
int w=win("Gadgets" "Afx:*" "" 0x4)
Acc a.Find(w "OUTLINEITEM" "IP Address" "class=SysTreeView32[]id=59648" 0x1035)
Any Ideas?
I have a tree that has multiple occurrences of a given text. For example
+ Device A
+ Interfaces
+ Port 0
- IP Address
+ Device B
+ Interfaces
+ Port 0
- IP Address
I'm oversimplifying on purpose... But here's what is going on. I first find the Device that i'm looking for. Say it's Device B in this case. I do something like this:
int w3=win("Gadgets" "Afx:*" "" 0x4)
Acc a3.Find(w3 "OUTLINEITEM" "Device B" "class=SysTreeView32[]id=59648" 0x1035)
act w3
act a3
int c3 = child(a3)
SendMessage c3 LVM_ENSUREVISIBLE a3.elem-1 0 ;; scroll to the location
a3.Select(3) ;; select and focus
Then I want to find the IP Address element of that particular device. But when I do the following, it almost always finds a leaf element of a different device somewhere higher in the tree. In this case, I have about 150 devices and each device has about 30 top level children and about a total of 1500 leaf parameters. I just want to tell the "Find" to start at the "selected" object.
int w=win("Gadgets" "Afx:*" "" 0x4)
Acc a.Find(w "OUTLINEITEM" "IP Address" "class=SysTreeView32[]id=59648" 0x1035)
Any Ideas?