[Lazarus] Should StringGrid1.Clear clear the fixed rows / columns?
Jesus Reyes
jesusrmx at yahoo.com.mx
Tue Aug 2 00:16:49 CEST 2011
--- El lun 1-ago-11, John Repucci <john.repucci at gmail.com> escribió:
De: John Repucci <john.repucci at gmail.com>
Asunto: Re: [Lazarus] Should StringGrid1.Clear clear the fixed rows / columns?
A: lazarus at lists.lazarus.freepascal.org
Fecha: lunes, 1 de agosto de 2011, 16:14
From: Jesus Reyes <jesusrmx at yahoo.com.mx>
... Delphi grids do not implement a clear method :D so this is not a compatibility problem, or is it?.
The add-on component VirtualStringView/Tree does implment a clear method that does not delete the headers.
Lazarus grids never meant to be compatible with virtualstringview/tree.
I can envision cases where I would like a completely empty SG and cases where I would like the fixed rows / columns to survive.
ex 1: Instead of creating a 2nd SG with a completely different header structure and purpose, wipe the original, add in the desired new fixed cells and start to fill it.
you can do this after grid.clear, or simply grid.rowcount := grid.fixedrows and then change the columns titles
ex: 2: (my current case...) Load in data, process it and then I need to purge the data, so I clear the SG and load in more data.
you can do this with grid.rowcount := grid.fixedrows (which is btw unsupported in delphi AFAIK), no need to use clear method
John
Jesus Reyes A.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110801/cfcab4da/attachment-0003.html>
More information about the Lazarus
mailing list