CheckedList框中的WordWrap控件 [英] WordWrap in CheckedList box Control

查看:82
本文介绍了CheckedList框中的WordWrap控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要将文本包装到checkedlistbox控件中的复选框标题的下一行。是否可以使用任何自定义方式进行操作?



我尝试启用控件的drawmode,但默认值为Normal。 / p>


有谁可以帮我解决这个问题

解决方案

CheckedListBox控件不提供wordwrap选项。


您的问题的解决方案可能是:



  • 使用DataGridView控件的第一列是复选框,第二列是wordwrapped文本
  • 在DrawItem事件中创建一个带有wordwarp行为的自定义类,请注意CheckedListBox控件没有公开这样的事件,你必须从ListBox制造它是

以下是DataGridView解决方案的一个示例:


< img alt =""src ="https://social.msdn.microsoft.com/Forums/getfile/1107747">




Hi,

i need to wrap the text to next line of checkbox caption inside the checkedlistbox control. is there any customized way of doing it is possible?

i tried to enable the drawmode of the control but it default value is Normal.

Could anyone please help me on this

解决方案

The CheckedListBox control does not provide a wordwrap option.

Solutions for your problem could be:

  • Use a DataGridView control with a checkbox in its first column, and the wordwrapped text in the second
  • Create a custom a class with a wordwarp behavior in the DrawItem event beware there is no such event exposed for the CheckedListBox control, you have to manufacture it from ListBox

Here is an example of the DataGridView solution:


这篇关于CheckedList框中的WordWrap控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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