Flicker in TListbox
Original Reporter info from Mantis: wp @wpam
-
Reporter name:
Original Reporter info from Mantis: wp @wpam
- Reporter name:
Description:
The first/last visible line of a listbox flickers when the scrollbar is moved up or down quickly.
The flicker can be avoided if the WMErasebackground message is handled without performing the erase action.
This is a regression in version 1.4 because the issue was not present in version 1.2.6. Possibly it is related to r47451 where some changes in the background erasing process were made.
Steps to reproduce:
Run attached demo. It shows two listboxes. The left one is a standard owner-drawn listbox. Drag the scrollbar to the center, and then drag it up and down quickly. Occasional flickering of the top and bottom lines will be seen.
The right listbox overrides the WMEraseBackground message such that no repaint of the background occurs. There is no flicker.
Run the demo in an older Lazarus version (I tested down to 1.0): they do not show any flicker. Therefore, I consider this to be a regression introduced in version 1.4.
Additional information:
The flicker may be difficult to see. Please see the forum thread (http://forum.lazarus.freepascal.org/index.php/topic,28464.msg178098.html#msg178098) for more details. I am attaching also the demo "Listbox_Test" of the OP which slows down painting of the listbox items to enhance the flicker effect.
According to the OP, the flicker occurs only on Windows.