开发者

Custom controls in a row of a list view

开发者 https://www.devze.com 2022-12-12 17:18 出处:网络
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,

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号