|
-
Oct 10th, 2007, 09:27 PM
#1
Thread Starter
Fanatic Member
[2005] listview column computation
i use timer control to compute the value of 2nd and 3rd column of a listview.
the problem is; the listview blinks everytime the timer perform computation.
the timer interval is 1;
kindly help me to avoid blinking of listview everytime it computes the value of 2nd and 3rd column?
-
Oct 10th, 2007, 09:56 PM
#2
Re: [2005] listview column computation
The SuspendLayout and ResumeLayout methods on the listview may help reduce your flicker.
Call the SuspendLayout, do your work, then call ResumeLayout.
-
Oct 10th, 2007, 10:07 PM
#3
Re: [2005] listview column computation
That is very, very bad. You are performing your calculation 1000 times a second. It's not that the ListView blinks EACH time. The problem is that you're doing it so frequently that the ListView doesn't even get a chance to repaint some times. Be realistic about the frequency with which you perform this calculation.
What are you calculating anyway? It may be that you don't even need a Timer at all but can instead use an event to recalculate only when the result may have changed. That's far more efficient.
-
Oct 11th, 2007, 12:26 AM
#4
Thread Starter
Fanatic Member
Re: [2005] listview column computation
Code:
Call the SuspendLayout, do your work, then call ResumeLayout.
how can i code or do it to avoid flickering?
-
Oct 11th, 2007, 12:29 AM
#5
Re: [2005] listview column computation
 Originally Posted by arshesander
Code:
Call the SuspendLayout, do your work, then call ResumeLayout.
how can i code or do it to avoid flickering?
DON'T UPDATE THE CONTROL 1000 TIMES PER SECOND.
-
Oct 15th, 2007, 03:28 PM
#6
Re: [2005] listview column computation
Instead of PMing me a few times, why don't you post what you have tried. Also, have you followed JMC's advice and lower the number of times you are refreshing the listview.
Noone is going to do the work for you, you need to make an effort and let us know the results.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|