Bypassing the TreeView.ItemHeight Limita - 项目摘要 |
摘要
| 管理 |
论坛 文档
| 软件包 |
|
|
|
项目描述: |
The property ItemHeight of the "System.Windows.Forms.TreeView" .NET control allows you to set the height of each item in your TreeView. It's a bit surprising, but .NET libraries developers have set a maximum value for this property.
If you set an item's height to greater than 24 pixels, the value is automatically reduced to 24 pixels before being processed. To bypass this limitation, you can override the TreeView class and the WndProc method, and then modify the parameters of the TVM_SETITEMHEIGHT message.
The source code that can be downloaded will help you to better understand the concept.
.NET 中的 "System.Windows.Forms.TreeView"控件的ItemHeight 属性可以让你设置TreeView中每个项目的高度。但 .NET 库开发人员在使用这一属性时有一个最大值。
如果你将这一属性的值设置为超过24像素,在生效前这一值会自动地变为24像素。为了避免这一问题,你需要重载TreeView 类,和 WndProc 方法,修改TVM_SETITEMHEIGHT 消息的参数。
下载的源代码可以帮你更好地理解这一概念。
来源: http://www.codeguru.com/cs_controls/MyTreeView.html |
类别: |
|
发布者:
cbd002
|
|
最新发布源码包 |
软件包 |
版本号 |
日期 |
本地下载 |
MyTreeView |
 1.0  |
2004-04-13 |
下载 |
|
|