THTMLTreeview - multiple selection code

I have a THTMLTreeview component (RAD Studio XE, THTMLTreeview version, C++).  I have multi-select enabled and can select all nodes of a certain level by clicking on the first and Shift Click on the last.

I would like to select all nodes of the same level using code.  I tried the following code:

int count = SectionTreeview->Items->Count;
for (int i = 0; i < count; i++) {
if (SectionTreeview->Items->Item->Level == 2)
SectionTreeview->Items->Item->Selected = true;

When I execute the above (it takes a long time) , it sequentially steps through selecting one node, but delselects the ones already selected.  How do I select all nodes of a certain level?

M Weingarden

Have you trued the same code on a regular TTreeView?
Multiselection behavior should be the same on a regular TTreeView as on THTMLTreeView, so you can consult documentation for TTreeView for doing this.