[Lazarus] TStringGrid Cell drawing

Jesus Reyes jesusrmx at yahoo.com.mx
Mon Aug 24 10:12:51 CEST 2009



--- El dom 23-ago-09, Matt Shaffer <dazappa.matt at gmail.com> escribió:

> >   
> I'd just like to say one thing about my last message;
> although now I 
> have everything drawing happily, it's very CPU intensive
> :S.
> Source: http://pastebin.com/m78f85f6c
> I'm thinking it's because it's running all of that code
> each time it 
> repaints? Is there a way to, I don't know, "render" the
> grid to prevent 
> so many calculations from being done?
> 

If using OnPrepareCanvas event, try to use Canvas properties instead of grids properties, for example changing grid's font results in new whole windows invalidates, the same for grid.color. So please try to see if using grid.canvas.font(.color, etc) and grid.canvas.brush.color makes any difference.

Jesus Reyes A.



      Encuentra las mejores recetas en Yahoo! Cocina.                       
http://mx.mujer.yahoo.com/cocina/




More information about the Lazarus mailing list