Link to home
Start Free TrialLog in
Avatar of directxBOB
directxBOBFlag for Ireland

asked on

TreeListView Selected Item Woes

Basically I have

if (m_myTree.SelectedItems[0].Tag != null)
{
.... some code
}

It seems to fall over once it reaches the first statement in my code because

m_myTree.SelectedItems[0].Tag != null but its not correct either. So I get a mis-match. My main question is why do you use

m_myTree.SelectedItems[0]

If its a tree structure, I am assuming because 0 is the first level for each node in the tree for the selected item when @ 0 is pointing to the leaf etc,
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AlexFM
AlexFM

Coutnt - should be Count.