TAdvStringGrid checkbox drawing

With the addition of VCL Style enabled cell checkbox drawing in TAdvStringGrid, the checkboxes in the AdvStringGrid now follow the drawing style (which looks way better. Hopefully, the dropdown buttons (from the combobox) will follow soon). Sadly, all the text following the first checkbox now turns black (which in darkmode makes this text unreadable. This means only the text on the first line to the left of the checkbox will be (in our case) white. All the rest of the text is black. I hope this is fixed soon, since I really want to use the dark checkboxes.

We applied an improvement for this VCL styles shortcoming affecting this. This improvement will be in the next update.

Sadly, the issue does not seem to be fixed in this release (the release notes say is should be fixed, but I still see this happening as described in my first post)

I cannot reproduce a problem with cell text rendered in an incorrect color:


Sadly, for me this is not the case (and I am sure I am at v10.7.7.0):

I just found out: Setting the fontcolor of the checkbox cell to something (doesn't matter which color) seems to fix it.

Setting any cell after the checkbox to a color (and don't set the fontcolor of the checkbox) makes that cell that color, but every cell that comes after it does get the default color (instead of staying black). The cells between the checkbox and the cell which sets a color do still stay black.

It seems it has to set a cell to a color in order to be reminded that the default color isn't black but actually is white (after a checkbox)

How exactly can I reproduce this?
With a default grid on the form initialized with

procedure TForm1.FormCreate(Sender: TObject);

I cannot see an issue.

I use C++, but when I add a default grid with the same options, my grid is also fine. As soon as I add the option 'goEditing' however, the issue appears.


object AdvStringGrid1: TAdvStringGrid
        Left = 96
        Top = 144
        Width = 593
        Height = 433
        DrawingStyle = gdsClassic
        FixedColor = clWhite
        Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goFixedRowDefAlign]
        TabOrder = 0
        GridLineColor = 13948116
        GridFixedLineColor = 11250603
        ActiveCellFont.Charset = DEFAULT_CHARSET
        ActiveCellFont.Color = 4474440
        ActiveCellFont.Height = -12
        ActiveCellFont.Name = 'Segoe UI'
        ActiveCellFont.Style = [fsBold]
        ActiveCellColor = 11565130
        ActiveCellColorTo = 11565130
        BorderColor = 11250603
        ControlLook.FixedGradientFrom = clWhite
        ControlLook.FixedGradientTo = clWhite
        ControlLook.FixedGradientHoverTo = clWhite
        ControlLook.FixedGradientHoverMirrorFrom = clWhite
        ControlLook.FixedGradientHoverMirrorTo = clWhite
        ControlLook.FixedGradientHoverBorder = 11645361
        ControlLook.FixedGradientDownFrom = clWhite
        ControlLook.FixedGradientDownTo = clWhite
        ControlLook.FixedGradientDownMirrorFrom = clWhite
        ControlLook.FixedGradientDownMirrorTo = clWhite
        ControlLook.FixedGradientDownBorder = 11250603
        ControlLook.DropDownHeader.Font.Charset = DEFAULT_CHARSET
        ControlLook.DropDownHeader.Font.Color = clWindowText
        ControlLook.DropDownHeader.Font.Height = -11
        ControlLook.DropDownHeader.Font.Name = 'Segoe UI'
        ControlLook.DropDownHeader.Font.Style = []
        ControlLook.DropDownHeader.Visible = True
        ControlLook.DropDownHeader.Buttons = <>
        ControlLook.DropDownFooter.Font.Charset = DEFAULT_CHARSET
        ControlLook.DropDownFooter.Font.Color = clWindowText
        ControlLook.DropDownFooter.Font.Height = -11
        ControlLook.DropDownFooter.Font.Name = 'Segoe UI'
        ControlLook.DropDownFooter.Font.Style = []
        ControlLook.DropDownFooter.Visible = True
        ControlLook.DropDownFooter.Buttons = <>
        Filter = <>
        FilterDropDown.Font.Charset = DEFAULT_CHARSET
        FilterDropDown.Font.Color = clWindowText
        FilterDropDown.Font.Height = -12
        FilterDropDown.Font.Name = 'Segoe UI'
        FilterDropDown.Font.Style = []
        FilterDropDown.TextChecked = 'Checked'
        FilterDropDown.TextUnChecked = 'Unchecked'
        FilterDropDownClear = '(All)'
        FilterEdit.TypeNames.Strings = (
          'Starts with'
          'Ends with'
          'Not contains'
          'Not equal'
          'Larger than'
          'Smaller than'
        FixedRowHeight = 22
        FixedFont.Charset = DEFAULT_CHARSET
        FixedFont.Color = 3881787
        FixedFont.Height = -11
        FixedFont.Name = 'Segoe UI'
        FixedFont.Style = [fsBold]
        FloatFormat = '%.2f'
        HoverButtons.Buttons = <>
        HTMLSettings.ImageFolder = 'images'
        HTMLSettings.ImageBaseName = 'img'
        Look = glCustom
        PrintSettings.DateFormat = 'dd/mm/yyyy'
        PrintSettings.Font.Charset = DEFAULT_CHARSET
        PrintSettings.Font.Color = clWindowText
        PrintSettings.Font.Height = -12
        PrintSettings.Font.Name = 'Segoe UI'
        PrintSettings.Font.Style = []
        PrintSettings.FixedFont.Charset = DEFAULT_CHARSET
        PrintSettings.FixedFont.Color = clWindowText
        PrintSettings.FixedFont.Height = -12
        PrintSettings.FixedFont.Name = 'Segoe UI'
        PrintSettings.FixedFont.Style = []
        PrintSettings.HeaderFont.Charset = DEFAULT_CHARSET
        PrintSettings.HeaderFont.Color = clWindowText
        PrintSettings.HeaderFont.Height = -12
        PrintSettings.HeaderFont.Name = 'Segoe UI'
        PrintSettings.HeaderFont.Style = []
        PrintSettings.FooterFont.Charset = DEFAULT_CHARSET
        PrintSettings.FooterFont.Color = clWindowText
        PrintSettings.FooterFont.Height = -12
        PrintSettings.FooterFont.Name = 'Segoe UI'
        PrintSettings.FooterFont.Style = []
        PrintSettings.PageNumSep = '/'
        SearchFooter.ColorTo = clNone
        SearchFooter.FindNextCaption = 'Find &next'
        SearchFooter.FindPrevCaption = 'Find &previous'
        SearchFooter.Font.Charset = DEFAULT_CHARSET
        SearchFooter.Font.Color = clWindowText
        SearchFooter.Font.Height = -12
        SearchFooter.Font.Name = 'Segoe UI'
        SearchFooter.Font.Style = []
        SearchFooter.HighLightCaption = 'Highlight'
        SearchFooter.HintClose = 'Close'
        SearchFooter.HintFindNext = 'Find next occurrence'
        SearchFooter.HintFindPrev = 'Find previous occurrence'
        SearchFooter.HintHighlight = 'Highlight occurrences'
        SearchFooter.MatchCaseCaption = 'Match case'
        SearchFooter.ResultFormat = '(%d of %d)'
        SelectionColor = 13744549
        SortSettings.HeaderColor = clWhite
        SortSettings.HeaderColorTo = clWhite
        SortSettings.HeaderMirrorColor = clWhite
        SortSettings.HeaderMirrorColorTo = clWhite
        Version = ''



I checked it once more, on two different machines with two IDE versions and I can't see the project. I copied your full grid settings and made sure goEditing is set in Options.


I can only suspect you still effectively compile against old version files.
Test project is here.
Project1.zip (105.8 KB)

Do you also have a *.cbproj version of the project? I cannot open *.dproj (I get the error message the "personality Delphi.Personality is not available").

It seems the Carbon style is all right, but the windows10 Charcoal does have this problem. I don't know if the stringgrid or the style settings themselve are the problem.

With Charcoal we could see the issue. Something is clearly not handled clean in the Embarcadero VCL styles implementation.
We added a workaround for it now that will be included in the next update.