简体   繁体   English

如何用不同的值设置CTreeCtrl的项目高度?

[英]How to set CTreeCtrl's item height with different value?

My need my tree control to have different items' height? 我需要树控件具有不同的项目高度吗? How can I do it? 我该怎么做? I try to handle MEASUREITEM but it doesnt work. 我尝试处理MEASUREITEM,但不起作用。 CTreeCtrl::SetItemHeight() changes item height but for all items. CTreeCtrl :: SetItemHeight()更改项目高度,但适用于所有项目。

Very good question... To be honest, I don't think it's possible. 很好的问题...老实说,我认为不可能。 At least not without doing the drawing of the tree yourself (which you probably don't want to do as it's a lot of work). 至少没有自己绘制树的情况(您可能不想这样做,因为这是很多工作)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将CTreeCtrl项目的复选框设置为部分状态 - Setting CTreeCtrl item's checkbox to partial state 如何使CTreeCtrl项目集中显示? - How to make a CTreeCtrl item centrally displayed? 如果整个标题当前不可见,MFC的CTreeCtrl如何自动显示包含该标题的工具提示? - How does MFC's CTreeCtrl automatically displays a tool tip, containing the title of the item, if the entire title is not currently visible? 调用SelectItem函数时,如何强制CTreeCtrl不滚动到该项? - How to force CTreeCtrl not to scroll to the item when SelectItem function is called? 如何在CTreeCtrl中获取所选项目的文件类型? 文件扩展名可能是隐藏的,因此GetItemText没有帮助 - How to get file type of selected item in CTreeCtrl? The file name extensions may be hidden, so GetItemText is not helpful 如何在MFC的CTreeCtrl列表中添加图像 - How to add image in CTreeCtrl list in MFC 设置 protobuf 项目的值也会替换之前设置的变量 - Setting a protobuf item's value replaces a previously set variable as well 如何将滑块的值设置为变量 - How to set a slider's value to a variable 如何从文本框的值设置字符串值 - How to set a string value from a textbox's value 如何在GridView中设置对象填充整个高度? - How to set the objects in the GridView fill the whole height?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM