Forum Discussion
markus_humm
13 years agoOccasional Contributor
Hello,
important is, to have a good connection to a Delphi/C++ Builder developer because it's easier for them to find out wich methods, properties and fields do exist for the VST. In my case it's pretty easy, because I just need to cunsolt myself! ;-) (developer and tester in one person)
Ok, now for a short script fragment to show you what can be done:
// determine the number of nodes in a given vst. Doesnn't matter if they're collapsed or not visible
function GetGridNodeCount(vst:OLEVariant):Integer;
var node:OLEVariant;
begin
result:=0;
// to determine node count we've to iterate over them
node:=vst.GetFirst;
while assigned(node) do
begin
inc(result);
// get next node
node:=vst.GetNext(node);
end;
Log.Message('VirtualTreeView '+vst.Name+' hat '+IntToStr(result)+' Knoten');
end;
To get the text of a node you can use vst.GetText(node, columnid);
(e.g. 0 for the first column or ith the tree has no columns simply the node text)
node.Height contains the height of a node in pixel and with vst.click(x, y);
you can click on something.
Those pointers should give you a start. But remember: all debug information and RTTI must be
on when compiling the Delphi application you want to test.
I hope this level of detail is sufficient for you. Greetings
Markus
important is, to have a good connection to a Delphi/C++ Builder developer because it's easier for them to find out wich methods, properties and fields do exist for the VST. In my case it's pretty easy, because I just need to cunsolt myself! ;-) (developer and tester in one person)
Ok, now for a short script fragment to show you what can be done:
// determine the number of nodes in a given vst. Doesnn't matter if they're collapsed or not visible
function GetGridNodeCount(vst:OLEVariant):Integer;
var node:OLEVariant;
begin
result:=0;
// to determine node count we've to iterate over them
node:=vst.GetFirst;
while assigned(node) do
begin
inc(result);
// get next node
node:=vst.GetNext(node);
end;
Log.Message('VirtualTreeView '+vst.Name+' hat '+IntToStr(result)+' Knoten');
end;
To get the text of a node you can use vst.GetText(node, columnid);
(e.g. 0 for the first column or ith the tree has no columns simply the node text)
node.Height contains the height of a node in pixel and with vst.click(x, y);
you can click on something.
Those pointers should give you a start. But remember: all debug information and RTTI must be
on when compiling the Delphi application you want to test.
I hope this level of detail is sufficient for you. Greetings
Markus
Related Content
- 14 years ago
- 14 years ago
- 14 years ago
- 14 years ago
Recent Discussions
- 19 hours ago