如何计算TreeView的高度? [英] How to calculate height of TreeView?

查看:119
本文介绍了如何计算TreeView的高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想计算TreeView的高度。

例如。



Hi,

I want to calculate Height of TreeView.
eg.

Node1
    Node 1.1
    Node 1.2





然后我想要计算树视图所需的空间(高度),包括相邻节点之间的空间。



提前致谢,

Pushkar



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

Thanks in advance,
Pushkar

推荐答案

如果您正在谈论Windows窗体,请使用 TreeView.ItemHeight [ ^ ]属性在你的计算中。



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

/ravi


这篇关于如何计算TreeView的高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆