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

Flávio Etrusco flavio.etrusco at gmail.com
Fri Feb 5 15:15:36 CET 2010


Ah, sorry, I completely misunderstood your problem. I guess the code
is missing some check(s) for "csDesigning in ComponentState"...
But actually, I can't quite follow the logic in the code:

...
OldCount:=RowCount;
    if (OldValue=0)and(NewValue>=0) then begin
      FTopLeft.X:=FFixedCols;
      if RowCount=0 then begin
        if Columns.Enabled then
          FFixedRows := 1
        else
          FFixedRows := 0;
        FTopLeft.Y:=FFixedRows;
        //DebugLn('TCustomGrid.AdjustCount A ',DbgSName(Self),'
FTopLeft=',dbgs(FTopLeft));
        AddDel(FRows, 1);
        FGCache.AccumHeight.Count:=1;
      end;
    end;
^^^

-Flávio

On Fri, Feb 5, 2010 at 10:14 AM, Paul van Helden <paul at planetgis.co.za> wrote:
> Hi Flávio,
>
> I'm using a TStringGrid for a checklistbox with two columns and don't ever
> want to see a title. So I set both FixedRows:=0 and RowCount:=0 in designer.
> Whenever I set RowCount to something more than 0, I have to set FixedRows
> back to zero again. I don't see the logic in that...
>
> Thanks,
>
> Paul.
>
> On 2010/02/05 02:42 PM, Flávio Etrusco wrote:
>>
>> On Fri, Feb 5, 2010 at 2:18 AM, Paul van Helden<paul at planetgis.co.za>
>>  wrote:
>>
>>>
>>> Can I add something please? :-)
>>>
>>> When setting RowCount:=0 (to clear the grid) and then RowCount:=5 it
>>> changes
>>> my FixedRowCount from 0 to 1. I don't want a title in this instance so I
>>> don't think the TStringGrid component should be getting all clever on
>>> me...
>>>
>>> Thanks,
>>>
>>> Paul.
>>>
>>> --
>>>
>>
>> This sure is a matter of taste, but wouldn't setting RowCount to
>> FixedRows work for you?
>>
>> -Flávio
>>
>>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>




More information about the Lazarus mailing list