Adding a checkbox to a .net ViewView

Hi peeps, its the first time i have tried to add a checkbox (or any control) to a listview in .net (2.0). Back in the days of VB6 you could get the items handle and use the set parent API to force a checkbox to sit in a listview's items subitem but this now does not seem the case?

I might just be looking in the wrong place but i cant seem to find out how to get the handle of a listviews items, let alone its subitems.

The only other thing I did notice is that each sub item does have a "checked" value and there is now a "draw subitem" sub which you can use to draw your own subitems.

So am I best off using the functionality given to me and draw the subitems which I want as checkboxes my self (using the checked value to draw them checked or unchecked) or can you get the handle's of the items so I can add a checkbox and or any other control to it?

Any help would be greate.

[1163 byte] By [Cadey] at [2007-12-24]
# 1
Have you seen the "CheckedListbox" Control...it functions just like the listbox but provides checkboxes for your items
DMan1 at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
Yeah that would be greate mate but im using a listview not a listbox.
Cadey at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3

The ListView itself has a "CheckBoxes" property that you set to true. Then the items have checkboxes you can click.

If that still doesn't give you want you want than you will have to draw the items yourself (or create a custom ListViewItem/ListViewSubitem).

rkimble at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4
Thanks again but i need more than one in each listview item and they need to go in the sub items too.
Cadey at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...