[Lazarus] How to get rid of text in (0,0) in StringGrid?

Flávio Etrusco flavio.etrusco at gmail.com
Thu Feb 4 15:34:22 CET 2010


2010/2/4 Flávio Etrusco <flavio.etrusco at gmail.com>:
>>
>>
>>
>>> Maybe the row-numbers option changes that. Try doing the row-numbering yourself.
>>
>> Jesus knows the StringGrid pretty well, so I'll wait a bit to see what he
>> says. Otherwise I'll simply paint the fixed column (row numbers) myself -
>> as you suggested.
>>
>>
>> Regards,
>>  - Graeme -
>>
>
> Maybe the StringGrid should be patched to stop populating/painting the
> FixedRows columns?
>
> -Flávio
>

Graeme, did you disable goFixedRowNumbering in your trial?
If not, it didn't work because of this in
TCustomStringGrid.DrawCellAutonumbering:
...
if Cells[aCol,aRow]='' then
    inherited DrawCellAutoNumbering(aCol,aRow,aRect,aValue);
...

My suggested fix is replace in Grids.pas, line 8504:
>>>
  if (goFixedRowNumbering in Options) and (aCol = 0) and (FixedCols >=
1) and (aRow >= FixedRows) then
    DrawCellAutonumbering(aCol, aRow, aRect, IntToStr(aRow - FixedRows +1));
===

Best regards,
Flávio




More information about the Lazarus mailing list