By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,309 Members | 1,196 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,309 IT Pros & Developers. It's quick & easy.

How to Draw Checkbox in ListView OwnerDraw

P: n/a
I'm using OwnerDraw for some customization in my ListView - adding
color to item backgrounds. I'm using the ListView specifically for
it's OwnerDraw capability. I originally was using the CheckedListBox
control but it has no OwnerDraw. I have not found a way to draw the
checkboxes while using OwnerDraw (the checkboxes appear correctly when
not using OwnerDraw). How can this be done? It would be nice if there
were something similar to e.DrawText().... like e.DrawCheckbox(). Oh,
and I'm using Visual Studio 2005 (Framework 2.0), which has an
OwnerDraw for ListView (older versions do not).

Thanks!

Jul 11 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

Take a look at the System.Windows.Forms.CheckBoxRenderer class.

HTH

<tm**@eclipse.netwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
I'm using OwnerDraw for some customization in my ListView - adding
color to item backgrounds. I'm using the ListView specifically for
it's OwnerDraw capability. I originally was using the CheckedListBox
control but it has no OwnerDraw. I have not found a way to draw the
checkboxes while using OwnerDraw (the checkboxes appear correctly when
not using OwnerDraw). How can this be done? It would be nice if there
were something similar to e.DrawText().... like e.DrawCheckbox(). Oh,
and I'm using Visual Studio 2005 (Framework 2.0), which has an
OwnerDraw for ListView (older versions do not).

Thanks!

Jul 12 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.