/*
Parent, GetNextChild, GetPrevChild example
The following code tests to see if the currently selected item has a sibling; if so, HasSibling will be set to true.
*/
TTreeNode *SelNode = TTreeView1->Selected;
TTreeNode *ParentNode = SelNode->Parent;
bool HasSibling = (ParentNode->GetPrevChild(SelNode) ||
                   ParentNode->GetNextChild(SelNode)); 
