Forum > FPSpreadsheet

[SOLVED] TsWorksheetGrid: Header is back.

(1/1)

deepla:
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

wp:
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  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---function TsCustomWorksheetGrid.GetIsCellTitle(ACol, ARow: Integer): Boolean;begin  Result := (FHeaderCount > 0) and (ARow = 0);end;  

deepla:

--- Quote from: wp 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  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---function TsCustomWorksheetGrid.GetIsCellTitle(ACol, ARow: Integer): Boolean;begin  Result := (FHeaderCount > 0) and (ARow = 0);end;  
--- End quote ---
The problem was solved using the above method.
Thank you.  :)

Navigation

[0] Message Index

Go to full version