TAdvStringGrid with Themes not honoring Fixed Row/Col options

Hi there!

I'm still experimenting with the VCL TAdvstringGrid to update my Delphi/Windows/VCL app to use high DPI and themes. Using latest Delphi 10.4.1 and latest TMS VCL UI Pack (as of 12/11/2020). Testing on Windows 10 Pro.

I'm struggling to get the grid to redraw properly. After applying a Delphi theme, the fixed lines always redraw and I cannot control their colors (seems true for all themes I tested). I really just want to hide those lines.

I've tried setting colors manually after the theme is applied and also tried setting the grid options to have no lines. Like this:

Grid.GridLineColor := Color1;
Grid.GridFixedLineColor := Color1;
Grid.Options := [goColSizing]; //i understand this should hide all grid lines

But the visibility/colors are not honored in the fixed lines. Am I missing something? Is there a setting in the TAdvStringGrid components to allow them to properly honor themes? I am using Delphi themes, not the TMS ones. I also tried with AutothemeAdapt set to both true and false. Same result.

P.S. I have also seen the grid fixed lines fail to render properly. If I have a grid on a tab with a Teechart on another tab, (occasionaly) the contents of the (hidden) chart seem to bleed through and are used in rendering the grid (almost like the fixed lines are transparent).

Thanks in advance for any advice!

Normally borders on fixed cells are controlled by grid.Options.goFixedVertLine /grid.Options.goFixedHorzLine
If you use VCL styles though, this border line is part of the style and thus it is the style (and not the grid) that draws this.
Our control respects this VCL style drawing, i.e. its border drawing also and the result is that it looks 100% identical to a TStringGrid using VCL Styles.

Here you see left TAdvStringGrid and right TStringGrid with the Carbon VCL Style:

Thanks Bruno - that is very helpful. I suppose I was hoping that one could override these things AFTER applying the style. It seems arbitrary to be able to override the internal grid lines and cell colors but not the fixed lines. Is that something you could consider implementing in future?

Did you have any thoughts on the rendering issues I described previously? Maybe that was just on my PC, but was wondering if anyone else had reported similar issues.

It is debatable what the desired behavior is.
We thought that matching the standard VCL UI controls look & feel was the most important here and thus respect how the chosen VCL style itself draws its border.

Thanks - but this does not really answer my question about whether you would be open to enhancing the control in the future: to allow the user to have control over additional aspects of the look and feel. This level of control is important to me, Without it, I guess I will probably have to abandon the idea of using themes or possibly look at using another control for tables. I recognize of course that perhaps other users don't care about such things so it may not be a priority for you.

I would note however that as things stand, this arrangement is inherently confusing to users of the component. TAdvStringGrid has a large number of properties that APPEAR to give the user a very detailed level of control over look and feel. It is nowhere documented that if they choose to apply a style that some (but not all) of those properties will no longer continue to work.

I hope the above is a useful and constructive suggestion!

Either way it is potentially confusing.

  1. Users choosing a VCL style and expect it to honor the VCL style
  2. Users choosing a VCL style but still expect some properties like border color to apply

We have thought that 1) was the most logical choice which is most consistent when one chooses VCL styles for the overall application look & feel.

Agreed - I guess I will take this is as a "no" on potential future changes.

I suggest to add this as feature request


when there is sufficient demand for this feature, we will consider extending the component to optionally enable this.