Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I want to calculate Height of TreeView.
eg.

Node1
    Node 1.1
    Node 1.2


Then I want to calculate space(height) required by treeview including space between adjacent nodes.

Thanks in advance,
Pushkar
Posted
Updated 24-Jun-15 2:09am
v2
Comments
Abhipal Singh 24-Jun-15 12:09pm    
Can you elaborate please?
Praveen Raghuvanshi 24-Jun-15 13:29pm    
What have you tried? http://mattgemmell.com/what-have-you-tried/
Maciej Los 24-Jun-15 16:22pm    
Why?
Sergey Alexandrovich Kryukov 25-Jun-15 1:39am    
Why? It suggests some misuse. Better let it scroll...
—SA

1 solution

If you're talking about Windows Forms, use the TreeView.ItemHeight[^] property in your calculations.

/ravi
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900