[fpc-pascal] gtk+ linux-windows
Alan Krause
alank at shermanloan.com
Wed Jun 24 16:14:06 CEST 2009
On Wed, Jun 24, 2009 at 7:01 AM, Graeme Geldenhuys <
graemeg at opensoft.homeip.net> wrote:
> OK, I see what you mean... I improved the performance very slightly by
> reducing the two for loops to a single one. I also updated the uses
> clause to the latest revision of fpGUI Toolkit. I also removed all the
> unnecessary .BeginDraw and .EndDraw calls. The whole HandlePaint method
> that you override is alread wrapped in a begindraw..enddraw call for
> double buffering support.
>
> Unfortunately I am not sure how to show the image while it is being
> generated. How is this done in Delphi VCL or Lazarus LCL?
>
If I understand the problem correctly, then I am guessing that the paint
event is not being called until after the loop is completed. In Delphi (and
I think also in the LCL), if you have a time consuming loop, it is always
wise to put an Application.ProcessMessages call in the loop so that the
application yields a bit of time to process other application messages which
may have been generated during the loop.
Hope this helps,
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20090624/d07d95b3/attachment.html>
More information about the fpc-pascal
mailing list