Recent

Author Topic: StringGrid Merge cellules  (Read 622 times)

gege

  • New member
  • *
  • Posts: 8
StringGrid Merge cellules
« on: March 21, 2023, 09:00:52 am »
Good morning,
I'm looking for a solution to merged cells with a StringGrid.
All the examples found on the net work with delphi 7 and 10 but not with lazarus?
What a technique used!
THANKS

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2069
  • Fifty shades of code.
    • Delphi & FreePascal
Re: StringGrid Merge cellules
« Reply #1 on: March 21, 2023, 09:12:26 am »
What you mean by saying "merge cells", can you exemplary show a "before..after" about how it is meant?
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

gege

  • New member
  • *
  • Posts: 8
Re: StringGrid Merge cellules
« Reply #2 on: March 21, 2023, 09:28:37 am »
I am looking for an identical representation used in EXCEL, using several contiguous cells to make one.
Example : https://delphi.developpez.com/faq/?page=Le-composant-TStringGrid#Comment-fusionner-les-cellules-d-un-StringGrid.

dsiders

  • Hero Member
  • *****
  • Posts: 1080
Re: StringGrid Merge cellules
« Reply #3 on: March 21, 2023, 09:44:02 am »
I am looking for an identical representation used in EXCEL, using several contiguous cells to make one.
Example : https://delphi.developpez.com/faq/?page=Le-composant-TStringGrid#Comment-fusionner-les-cellules-d-un-StringGrid.

Have you looked at the example programs in examples/gridexamples/merged_cells/?
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

gege

  • New member
  • *
  • Posts: 8
Re: StringGrid Merge cellules
« Reply #4 on: March 21, 2023, 09:59:51 am »
Many thanks, I thought of several types of research except this one, which gives the solution to my problem.

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: StringGrid Merge cellules
« Reply #5 on: March 21, 2023, 10:38:57 am »
If you prefer a ready-made grid with merged-cell support you could try TsWorksheetGrid from the fpspreadsheet package (https://wiki.lazarus.freepascal.org/TsWorksheetGrid, available via OPM). But you'll get the entire spreadsheet functionality which you probably do not need.

 

TinyPortal © 2005-2018