[Lazarus] String Grid Component

Werner Pamler werner.pamler at freenet.de
Mon Nov 27 16:48:12 CET 2017

Am 27.11.2017 um 16:21 schrieb Werner Pamler via Lazarus:
> (a) What is "fast"? If I populate a standard TStringGrid with 100.000 
> rows x 100 columns (= 10 millions of cells) it takes about 9 seconds 
> on my PC - if BeginUpdate/EndUpdate is used. Not too bad in my eyes. 
> If it's too long you should use a TDrawGrid and paint the cells in the 
> OnDrawCell event. Since this draws only the visible cells it will 
> occur within the blink of an eye. Editing a TDrawGrid is a bit more 
> complicated, though, but doable.

I forgot: Of course, this does not take into account the time it takes 
to populate the primary storage of the data shown in the DrawGrid. 
Filling a 2D-array with millions of strings, for example, will take its 
time too, 6 seconds on my PC for a 100.000 x 100 array. In these tests, 
the string is assembled as 'R' + IntToStr(rowindex) + 'C' + 

Look at attached demo.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: huge_grid.zip
Type: application/x-zip-compressed
Size: 2585 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20171127/94f50ad3/attachment-0001.bin>

More information about the Lazarus mailing list