CListCtrl启用了组视图和长字幕 [英] CListCtrl with group view enabled and long subtitles

查看:51
本文介绍了CListCtrl启用了组视图和长字幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用CListCtrl显示分组属性列表。这些组中的每一组都应该用解释性文字来描述。这就是为什么我输入较长的文本作为小组的字幕。


如果字幕足够短以使它适合一行,那么一切看起来都很好。

但是,如果字幕长于一行,则将其包装在列表控件的宽度处。不幸的是,包裹的行然后由列表的以下内容叠加。 


例如,组的项目的内容覆盖包装的字幕。折叠组时,字幕将由以下组叠加。 
$


另请参阅方法,用于设置描述当前列表视图控件的指定组的信息。


设置cchSubtitle,其中包含字幕  LVGROUP结构的大小。


或者您可以尝试使用
CListCtrl :: SetGroupMetrics
方法来设置组指标列表视图控件。


希望这可以帮到你。


最好的问候,


Baron Bi


I use the CListCtrl to display a list of grouped properties. Each of these groups should be described by an explanatory text. That's why I entered longer texts as subtitles for the groups.

If the subtitle is short enough that it fits in one line, then everything looks fine.
However, if the subtitle is longer than one line, it is wrapped at the width of the list control. Unfortunately, the wrapped lines are then superimposed by the following contents of the list. 

For example, the content of the items of the group overwrite the wrapped subtitle. When the group is collapsed, the subtitle is superimposed by the following groups. 

See also the examples in the screenshot below:

  • Group 1 has a short subtitle and all looks fine.
  • Group 2 has a log subtitle, which is overwritten by the contents of the items.
  • Group 3 is collapsed and the wrapped subtitle is overwritten by the content of group 4.

Is there a way to expand the area for these subtitles?

Regards,
Friedbert

解决方案

Hi Widmann,

thanks for posting here.

>>Is there a way to expand the area for these subtitles?

For this case, you could try to use CListCtrl::SetGroupInfo method to set the information that describes the specified group of the current list-view control.

Set the cchSubtitle in which contains the size of the subtitle LVGROUP structure.

Or you could try to use CListCtrl::SetGroupMetrics method to set the group metrics of a list view control.

Hope this could be help of you.

Best Regards,

Baron Bi


这篇关于CListCtrl启用了组视图和长字幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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