Recent

Author Topic: Border not working for fixed cells  (Read 4924 times)

witenite

  • New Member
  • *
  • Posts: 41
Border not working for fixed cells
« on: March 15, 2017, 11:42:23 am »
Hi,
my table is looking quite presentable, complete with a border as seen here

However when I fix the two rows in my table (by the addition of the code  tblProperties.fixedrows := 2;  where tblProperties is of type TsWorksheetGrid) my borders are no longer visible. It just appears as if they are blanked out by white grid-lines as seen here.

Note I have the grid lines disabled, yet I have tried enabling them, or even setting them to red, yet the white lines between cells remain white at all times (as long as I have fixed rows). I therefore do not think these are grid lines at all, so they must be border lines, but then why am I not able to programmatically set them correctly? What am I doing wrong for setting the border for fixed cells.
« Last Edit: March 15, 2017, 11:47:10 am by witenite »

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: Border not working for fixed cells
« Reply #1 on: March 16, 2017, 10:10:07 pm »
This is just a notification that I am working on this issue. It turned out, however, that the WorksheetGrid has several other painting issues, some of them not seen so far, some of them slipped in during the time. Therefore it may take some time until everything is fixed.

witenite

  • New Member
  • *
  • Posts: 41
Re: Border not working for fixed cells
« Reply #2 on: March 17, 2017, 10:01:00 am »
This is just a notification that I am working on this issue. It turned out, however, that the WorksheetGrid has several other painting issues, some of them not seen so far, some of them slipped in during the time. Therefore it may take some time until everything is fixed.
No hassle WP, I think you've done one hang of a job with this component so far. I/we can keep working with what we have (I still have plenty other code of my own to write and bugs to fix) until you have a few more issues ironed out. I'll keep logging bug reports if I find anything else, though I'm going to try and take my focus away from the table for now and get into the "meat" of my application. Good luck!

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: Border not working for fixed cells
« Reply #3 on: March 21, 2017, 06:37:01 pm »
Please try out the current trunk version of fpspreadsheet. It has some improvements in grid painting of frozen cells.

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: Border not working for fixed cells
« Reply #4 on: March 28, 2017, 11:05:22 am »
Sorry, too much diffuse information for my crystal ball... You must strip down the part of your project which is not working to a little demo and upload it here. Without code I cannot help, too many places where things can go wrong. Please add the pas, lfm, lpr and lpi files to a common zip and upload it here. Avoid non-standard components (no PKSheet, no PKComponent).

Crashes often occur if components are not created.

If you want to reuse my border code why don't you add the worksheet to the parameter list? Don't introduce global variables for this purpose.
Code: Pascal  [Select][+][-]
  1. procedure Border(ASheet: TsWorksheet; ARow, ACol: Integer; ABorder: TsCellBorder;
  2.   AColor: Integer;  ALineStyle: TsLineStyle);
  3. var
  4.   cell: PCell;
  5.   currentBorders: TsCellBorders;
  6. begin
  7.   cell := ASheet.GetCell(ARow, ACol);  // Use GetCell to create a new cell if required
  8.   currentBorders := ASheet.ReadCellBorders(cell);
  9.   Include(currentBorders, ABorder);
  10.   ASheet.WriteBorders(cell, currentBorders);
  11.   ASheet.WriteBorderColor(cell, ABorder, AColor);
  12.   ASheet.WriteBorderLineStyle(cell, ABorder, ALineStyle);
  13. end;  

P.S.
If you refer to other thread please add a link. I write so many answers to different topics, and it is quite difficult to understand to which one you refer.

 

TinyPortal © 2005-2018