I want to have some customized controls in a column of a Listview control (of course when the view is set to deyails). The custome control might be a comboBox or some images or a textbox.
Thanks in advance.
Kundan
Kundan3 Wednesday, May 11, 2005 2:15 PM
The ListView control does not support hosting arbitrary controls. From the description of your scenario, it sounds like the new DataGridView control might be a better fit for your needs.
- mike
Mike Harsh Thursday, May 12, 2005 5:18 PM
The ListView control does not support hosting arbitrary controls. From the description of your scenario, it sounds like the new DataGridView control might be a better fit for your needs.
- mike
Mike Harsh Thursday, May 12, 2005 5:18 PM
Hi all I'm interested in the same subject as I needed to add some controls to the columnHeaders of the listview. I had made some success in that but with problems. First I increased the height of the columnHeader by using the sendmessage API to retrieve the handle of the columnHeader using the (LVM_GETHEADER) then calling the SetWindowPos to change the height. then I used the listview.controls.add to add the controls I need (ComboBox) and I resized each to fit the column it represents till now every thing is OK but the problems I face are 1- I need to handle the column resize which I have no event for 2- the Headers do not redraw properly after filling the listview (even if I did that after the filling) 3-The Text of the columnHeader horizontal alignment is always in the middle