i'm currently inheriting from the ListBox control and providing my own drawing code.
I'm drawing a gradient background on each listbox item. All fine, however the gradient i'm drawing is a little away from the edge of the actual rectangle so youll see some white space around the actual rectangle.
All fine till when you run it and when u resize the listbox, only the first item gets refreshed and draw appropriately.
If i drew the gradient so that it covered the whole rectangle up with no spaces between the edges, and if i resize it during runtime, all the items become drawn correctly.
Here's a screenshot of the issue when it's resized
Question
Winston
Ok, this might be hard to understand but anyways:
i'm currently inheriting from the ListBox control and providing my own drawing code.
I'm drawing a gradient background on each listbox item. All fine, however the gradient i'm drawing is a little away from the edge of the actual rectangle so youll see some white space around the actual rectangle.
All fine till when you run it and when u resize the listbox, only the first item gets refreshed and draw appropriately.
If i drew the gradient so that it covered the whole rectangle up with no spaces between the edges, and if i resize it during runtime, all the items become drawn correctly.
Here's a screenshot of the issue when it's resized
http://www.ug.it.usyd.edu.au/~wpan6331/ss/ss.JPG
Has anyone experienced the same situation before?
Thanks
Link to comment
https://www.neowin.net/forum/topic/270286-drawing-problem-with-list-box-net/Share on other sites
13 answers to this question
Recommended Posts