Recent

Author Topic: I trying to find grid with header bands (like TreeList in DevExpress)  (Read 1651 times)

Pixelmak

  • New member
  • *
  • Posts: 7
Hello

I need to find grid, where i can create custom headers. In the Delphi i was using TreeList (DevExpress). VST can be completely satisfied me, but i need custom header.

Like on screenshot
« Last Edit: January 11, 2021, 10:43:26 am by Pixelmak »

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: I trying to find grid with header bands (like TreeList in DevExpress)
« Reply #1 on: January 11, 2021, 10:50:37 am »
At first: Please do not post attachments on some cloud servers because they will be gone some time in the future and your post will be useless to anybody visiting your post later.

I don't understand the screenshot. Is "IMG" the placeholder for an image? And those "edit-like" fields, are they merged header cells? You can achieve a lot with the standard TStringGrid - look at the demos in folder (lazarus)/examples/gridexamples which cover also embedded images and merged cells.

Title images are supported by the standard TStringGrid (property TitleImageList, and ImageIndex in each column's Title)
« Last Edit: January 11, 2021, 10:56:15 am by wp »

Pixelmak

  • New member
  • *
  • Posts: 7
Re: I trying to find grid with header bands (like TreeList in DevExpress)
« Reply #2 on: January 11, 2021, 11:20:21 am »
In the Delphi with TreeList i can add the Bands and then add columns to this bands. Then i can move bands, show/hide it and to many other functions.
But the most important that i can group columns by creating a multi-rows header.

I importing the project from Delphi and it have a lot of this grids with multi-rows headers (like calendars, journals and etc.). I am afraid that I will have to rewrite a lot of code.

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: I trying to find grid with header bands (like TreeList in DevExpress)
« Reply #3 on: January 11, 2021, 11:41:55 am »
To get multi-row headers in the standard LCL StringGrid you simply set FixedRows to the number of rows in the header. Merging columns (also: merging of rows) is addressed by one of the demos is mentioned.

But yes, of course, even if this works out this solution will not be compatible with TreeList, and you'll still have a lot to do to convert all these grids...

Did you consider porting the DevExpress component to Lazarus? I saw on their site that they do not support LCL, but you should have their sources. In a first try you could simply create a package for the TreeList and try to compile it. Keeping the Windows-related units, often this works with minor adjustments. Only in a next step you could try to make the package cross-platform by replacing the Windows units by LCL units (Windows --> LCLIntf and LCLType, Messages --> LMessages).

Pixelmak

  • New member
  • *
  • Posts: 7
Re: I trying to find grid with header bands (like TreeList in DevExpress)
« Reply #4 on: January 12, 2021, 09:19:29 am »
I decided that I would create a StringGrid based component. I was trying to porting TreeList, but it have too much dependencies.

Thanks for the help.

 

TinyPortal © 2005-2018