Click here to Skip to main content
15,888,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have an owner-drawn list box. It seems to work fine, that is, the rows are drawn as I expect, but I have a niggle with it.

As I move up an down the list using the arrow keys then the first time I move to any particular row the whole list repaints causing it to flicker.

If I subsequently move to a row I have already been on then the repaint does not occur (no flicker).

So, if I arrow down from top to bottom it flickers on every newly entered row but after doing this I can move about at will and get no repaint/flicker.

Does anyone know what is happening here and how I can avoid the repaint?

It's just a cosmetic thing really but irritating.

Thanks.
Posted
Comments
BillWoodruff 30-Dec-15 4:39am    
This is Windows Forms ? You are using 'DoubleBuffered ? You are sub-classing the Win Form ListBox ... or, you are creating your own ListBox from "scratch" ?
Ralf Meier 30-Dec-15 7:05am    
Perhaps you should show us the relevant code - I suspect it is done in the OnPaint-method ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900