
(*
 Delphi Object and Component Reference
#{bmc bm9.BMP} Selected, Item example
The following code uses Item to add the labels of all child nodes of the selected node to a list box when a button is clicked.
*) 
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  for (int i = 0; i < TreeView1->Selected->Count; i++)
    ListBox1->Items->Add(TreeView1->Selected->Item[i]->Text);
}
 
