Drawing problem with listbox

Winston

Well-known member
Joined
Jan 25, 2003
Messages
266
Location
Sydney, Australia
Ok, this might be hard to understand but anyways:


im currently inheriting from the ListBox control and providing my own drawing code.

Im drawing a gradient background on each listbox item. All fine, however the gradient im 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.


Heres a screenshot of the issue when its resized

http://www.ug.it.usyd.edu.au/~wpan6331/ss/ss.JPG

Has anyone experienced the same situation before?

Thanks
 
I encountered a similar problem with some gdi buttons i created. when being resized they didnt redraw correctly. I found this to be because i wasnt refreshing the display on resizing. Im not sure your problem is the same but try putting a me.refresh in the resize event.

Dill
 
Back
Top