Recent

Author Topic: [SOLVED] TsWorksheetGrid: Header is back.  (Read 2450 times)

deepla

  • New Member
  • *
  • Posts: 10
[SOLVED] TsWorksheetGrid: Header is back.
« on: July 09, 2021, 10:53:30 pm »
Hello,
When using the TsWorksheetGrid component with the following settings, the Header is displayed at the FrozenRows position, and the contents of the cell at that position cannot be rewritten.

sWorksheetGrid1.ShowHeaders := False;
sWorksheetGrid1.FrozenRows := 2;


This has been confirmed on both Windows and Linux.
Is it possible to hide this Header and rewrite the contents of the cells located in FrozenRows?


Lazarus 2.0.12 / fpc 3.2.0 / Windows 10 / Lubuntu 18.04(64bit)
FPSpreadsheet 1.12.0.0
« Last Edit: July 10, 2021, 12:18:54 am by deepla »

wp

  • Hero Member
  • *****
  • Posts: 9034
Re: TsWorksheetGrid: Header is back.
« Reply #1 on: July 09, 2021, 11:44:52 pm »
Please try the new version in ccr.

If you do not have svn add the following method to TsCustomWorksheetGrid (unit fpspreadsheetgrid.pas in folder source/visual) and declare it as "override" (in the protected section) and rebuild the IDE.

Code: Pascal  [Select][+][-]
  1. function TsCustomWorksheetGrid.GetIsCellTitle(ACol, ARow: Integer): Boolean;
  2. begin
  3.   Result := (FHeaderCount > 0) and (ARow = 0);
  4. end;  
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

deepla

  • New Member
  • *
  • Posts: 10
Re: TsWorksheetGrid: Header is back.
« Reply #2 on: July 10, 2021, 12:17:01 am »
Please try the new version in ccr.

If you do not have svn add the following method to TsCustomWorksheetGrid (unit fpspreadsheetgrid.pas in folder source/visual) and declare it as "override" (in the protected section) and rebuild the IDE.

Code: Pascal  [Select][+][-]
  1. function TsCustomWorksheetGrid.GetIsCellTitle(ACol, ARow: Integer): Boolean;
  2. begin
  3.   Result := (FHeaderCount > 0) and (ARow = 0);
  4. end;  
The problem was solved using the above method.
Thank you.  :)

 

TinyPortal © 2005-2018