Custom controls in a row of a list view
I want a list view control (or any list like control) in which each row (item), not only has text, but also some other controls. For example, each row (item) in my list view is composed of a checkbox, button, a slider, a image and a label. I tried the corresponding renderer classes (CheckBox renderer) in the owner drawn event, but i am not able to handle the events (as they are just used to render the control on the screen).
I tried to search for solutions, but in vain. So I have decided to have a panel and then create objects of those controls in runtime, for ea开发者_如何学JAVAch item and add it to the parent panel. Is the solution ok? I feel this to be process costly. Help me out !!
Note, I am using WinForms and no DataTemplates or WPF stuffs
Maybe this helps?
http://www.codeproject.com/KB/list/extendedlistviews.aspx
精彩评论