ListBox owner drawing
-
Can anyone point me to a good way to draw a usercontrol inside a listbox over and over again? What I mean is to insert something like a panel (with stuff on it obviously) inside a listBox and have that be displayed instead of some random strings (I've tried inserting it and I get random strings...I honestly don't remember what though). I REALLY don't wanna have to draw everything with GDI+ so if anyone knows a way to do that, I would appreciate it greatly. Note: It can also be a listview - either will do fine. I haven't found anything on CP that shows how to do that, so if there is something, please point me there. and forgive my stupidity.
-
Can anyone point me to a good way to draw a usercontrol inside a listbox over and over again? What I mean is to insert something like a panel (with stuff on it obviously) inside a listBox and have that be displayed instead of some random strings (I've tried inserting it and I get random strings...I honestly don't remember what though). I REALLY don't wanna have to draw everything with GDI+ so if anyone knows a way to do that, I would appreciate it greatly. Note: It can also be a listview - either will do fine. I haven't found anything on CP that shows how to do that, so if there is something, please point me there. and forgive my stupidity.
Mmm cool idea, a
ListBox
for controls. Off the top of my head, you'd create the controls say,Panel
s, as children of theListBox
, and depending on the scrolling, move the controls that should be visible to somewhere inside the visible area of theListBox
. You'd have to write some code for the scrolling, and managing of the controls, but you can let them paint themselves. And don't forget to write an article for CP once you're done. -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!