Listview flickering problem

Listview flickering problem

Post by John Le » Tue, 30 Nov 2004 15:22:02


Thanks Jay for your response.

I tried your code and it still flickering a lot. To demonstrate it, you can
grab a listview, create 3 columns - name, value, timestamp, in form_load
event to add 50 items into that listview as Item1 - Item49, add a timer to
your windows form, set the timer interval to 100 ms, in the event handler,
add the code to update the value and timestamp

Random r = new Random();
listView1.BeginUpdate();
for (int i = 0; i < 50; i++)
{
listView1.Items[i].SubItems[1] = r.Next(0, 10000).ToString();
listView1.Items[i].SubItems[2] = DateTime.Now().ToLongTimeString();
}
listView1.EndUpdate();

Anyone could make the flickering goes away would be my star!!!! or any other
solution to this fast updating problem?

Thanks in advance!
John
 
 
 

Listview flickering problem

Post by C# Learne » Tue, 30 Nov 2004 20:48:14


Only way I found was to use a different ListView control. See
http://www.yqcomputer.com/

 
 
 

Listview flickering problem

Post by U3VkaGFrYX » Tue, 30 Nov 2004 21:57:02

You can do a SuspendLayout > Fill the ListView > ResumeLayout()

HTH
Sudhakar Sadasivuni
http://www.yqcomputer.com/
MyUG : http://www.yqcomputer.com/