[Lazarus] Should StringGrid1.Clear clear the fixed rows / columns?

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Aug 2 08:31:38 CEST 2011


On 08/02/2011 12:16 AM, Jesus Reyes wrote:
>     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

In my applications I use this second example a lot! I simply need to
refresh the data, not the fixed headers. I think the problem comes in
that Clear is confusing. Some expect one behaviour, you expect another.
Maybe introduce another method ClearAll() that completely blanks the
grid so it looks like a memo. Then change Clear to simply clear the grid
but keep the fix rows. Or introduce a boolean parameter to Clear() like
what was proposed earlier.

Yes I fully understand what you wanted Clear to mean - blank the whole
grid. But clearly that is not what the Lazarus users expect. This is not
the first time this issue was brought up [and surely not the last], so
that is just proof of my previous sentence.

Just my 2ยข worth...

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/





More information about the Lazarus mailing list