TAdvStringGrid selection background with theme

  1. I have ActiveRowShow and rowSelect=False, it seems to change the background color in a way that doesn't work with the theme.

image

  1. Would also be very nice if the grid components could not clutter the .dfm with unchanged settings that I never use, e.g. PrintSettings, ControlLook, FilterDropDown, SearchFooter

  2. How does one edit the text in a grid cell with a checkbox? Clicking anywhere seems to change the checkbox

  1. Is this the latest version of the grid? What theme do you use? What are your full grid settings? With just setting ActiveRowShow = true and goRowSelect = false, I cannot see such behavior here.
  2. There are several color settings that are initialized according to operating system theme, so these are not really fixed values. We'll look if we can do further optimizations though.
  3. Cell editing is either going via a checkbox or via text editing. If you add a checkbox to the cell, it is the checkbox that is editable. I'd recommend to add your checkbox in a separate small column preceding the text column for text that goes with the checkbox.

Thanks for the checkbox suggestion. Yes it was latest version. My settings below after changing to ActiveRowColor = clHighlight (rather than infobk), which works OK with Windows 11 Modern dark. I guess the root of my confusion here is that SelectionTextColor defaults to clBlack which I assume does not map with theme, so I had set to clHighlightText (would be easier to tell what I'd changed if the dfm did not have so many redundant unchanged settings...).

object ListGrid: TAdvStringGrid
Left = 218
Top = 27
Width = 316
Height = 313
Anchors = [akLeft, akTop, akRight, akBottom]
ColCount = 2
DefaultColWidth = -1
DrawingStyle = gdsClassic
FixedColor = clWhite
FixedCols = 0
RowCount = 1
FixedRows = 0
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goDrawFocusSelected, goEditing, goTabs, goFixedRowDefAlign]
PopupMenu = PopupMenu1
ScrollBars = ssVertical
TabOrder = 9
OnDblClick = ListGridDblClick
OnKeyDown = ListGridKeyDown
ActiveRowShow = True
ActiveRowColor = clHighlight
OnCheckBoxClick = ListGridCheckBoxClick
OnEditingDone = ListGridEditingDone
ActiveCellFont.Charset = DEFAULT_CHARSET
ActiveCellFont.Color = 4474440
ActiveCellFont.Height = -12
ActiveCellFont.Name = 'Segoe UI'
ActiveCellFont.Style = [fsBold]
AutoSize = True
ColumnSize.Stretch = True
ColumnSize.StretchColumn = 0
ControlLook.FixedGradientHoverFrom = clGray
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 = <>
ControlLook.ToggleSwitch.BackgroundBorderWidth = 1.000000000000000000
ControlLook.ToggleSwitch.ButtonBorderWidth = 1.000000000000000000
ControlLook.ToggleSwitch.CaptionFont.Charset = DEFAULT_CHARSET
ControlLook.ToggleSwitch.CaptionFont.Color = clWindowText
ControlLook.ToggleSwitch.CaptionFont.Height = -12
ControlLook.ToggleSwitch.CaptionFont.Name = 'Segoe UI'
ControlLook.ToggleSwitch.CaptionFont.Style =
ControlLook.ToggleSwitch.Shadow = False
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'
'Contains'
'Not contains'
'Equal'
'Not equal'
'Larger than'
'Smaller than'
'Clear')
FixedColWidth = 300
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 = glListView
Multilinecells = True
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.Color = clBtnFace
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 = clHighlight
SelectionTextColor = clHighlightText
SortSettings.HeaderColorTo = clWhite
SortSettings.HeaderMirrorColor = clWhite
SortSettings.HeaderMirrorColorTo = clWhite
Version = '9.1.1.0'
ColWidths = (
300
12)
RowHeights = (
22)
end

When I paste this grid here, what I see is:

when I click this first row, I do not see anything unusual.
So, how exactly can this issue be reproduced?

Delete "ActiveRowColor = clHighlight" - that was my fix.

(and set dark style)

In dark style, I see here: