Click to See Complete Forum and Search --> : Subitems


Goose
November 30th, 1999, 04:07 AM
Is it possible to add checkboxes to the subitems of Listviews or FlexGrids ?

If so how ?

jusclev
November 30th, 1999, 11:50 PM
The closest solution I can think of is to use pictures in the cells of your FlexGrid control.

Store two pics in your application -
1. An empty check box
2. A checked box
- and interchange between them when necessary. You will have to size your cells to fit the pics.

Change from one pic to the other using the control's click event. The MouseRow/MouseCol properties will identify the cell that was clicked.

This technique works well with treeview controls.
Use TreeViewControlName.SelectedItem.Index to identify the location for the new image.

I've never tried it with listview controls (Sorry).

I hope I was able to help.
jusclev

Ravi Kiran
December 1st, 1999, 05:22 AM
Yes it is possible to have check boxes in Listview (if the IE version is > 4.0), but it is only for First item.
It is also possible to have pictures in sub items, so using a picture that looks like a check box, may be you can simulate the effect. This is not all that easy, and i had seen the C- code (WIn32 sample). I dont off-hand remember if it involes subclassing or just windows messages!.
you need to port it. I will tell you if you are interested in taking that path, or check MSDN

With MS flexgrid, see the other reply. That is the best and easy method.

RK