Page 1 of 1

Mobile - Disable repaint temporarily

Posted: Wed Feb 05, 2014 9:44 pm
by 16565417
Hello,

I'm using XE5, developing for iOS. I put together a very simple demo that is attached. Basically I put a TListview and a TChart on a form, they aren't connected at all. When the TChart is blank, scrolling the listview works fine. As soon as I add one item scrolling becomes laggy because the chart is constantly being repainted (in the example there is a memo that logs how often paint is called).

A simple solution would just be disable repainting briefly while scrolling. Is there any way to do that?


(I posted this problem on Stack Overflow, if interested you can look here: http://stackoverflow.com/questions/2155 ... firemonkey)

Re: Mobile - Disable repaint temporarily

Posted: Fri Feb 07, 2014 3:04 pm
by narcis
Hello Michael,

We could reproduce the problem here and we will investigate it. However, according to your StackOverflow post, I understand you can reproduce the issue without TeeChart, can't you? If that's the case it might not be a TeeChart problem but a Firemonkey or iOS issue.

Re: Mobile - Disable repaint temporarily

Posted: Mon Feb 10, 2014 4:58 pm
by 16565417
Hi, thanks for your reply.

I think the problem probably is with Firemonkey. I was hoping there would be a way to work around the problem without having to wait for XE6 or whenever it gets fixed. Is there no way to specify to a TChart when it should paint and when it shouldn't?

Re: Mobile - Disable repaint temporarily

Posted: Tue Feb 11, 2014 8:22 am
by narcis
Hi Michael,
Michael wrote:Is there no way to specify to a TChart when it should paint and when it shouldn't?
Yes, that is using AutoRepaint property, setting it to false, enabling it to refresh the chart and set it back to false. I tried that but didn't work with your project, OnPaint event was still fired. TListView forces a complete form repaint.