Checkedlistbox, different font (style) for each item?
-
Hello, everyone. A little help needed ) Is there any posibility to use different font style for different items in checkedlistbox? For example, if I want to strike item if it's checked? Can't find how to do that with standart checkedlistbox ( Thanks,
-
Hello, everyone. A little help needed ) Is there any posibility to use different font style for different items in checkedlistbox? For example, if I want to strike item if it's checked? Can't find how to do that with standart checkedlistbox ( Thanks,
I think you'll need to handle the drawing yourself to do that. You can get the same effect by using a ListView with the View set to List and CheckBoxes to true, then set the Font of any ListViewItems that you need to have different. [edit] Just had a look, and the CheckedListBox doesn't support DrawItem so it's going to be a little more difficult if you don't want to use a ListView. You'd have to derive your own class from CheckedListBox and override OnDrawItem there.[/edit]
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) -
I think you'll need to handle the drawing yourself to do that. You can get the same effect by using a ListView with the View set to List and CheckBoxes to true, then set the Font of any ListViewItems that you need to have different. [edit] Just had a look, and the CheckedListBox doesn't support DrawItem so it's going to be a little more difficult if you don't want to use a ListView. You'd have to derive your own class from CheckedListBox and override OnDrawItem there.[/edit]
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)I've tryed to handle drawing, but it draws all control and I need one item (
-
I've tryed to handle drawing, but it draws all control and I need one item (
See the edit to my previous post.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)