TStringGrid.FadeUnfocusedSelection property
Indicates if a special color is used for selected cells when the control loses focus.
Declaration
property FadeUnfocusedSelection:;Description
FadeUnfocusedSelection is a
Boolean property which
indicates if inactive caption and text colors are used to draw the selected
cells in the grid when the control loses focus. It causes color values for
the Brush and Font on the Canvas to be updated.
When set to True and the control is not Focused, an sRGB color difference between the Font color and the clBtnFace color is used to select the color values applied to the Canvas. If the color distance at least 25%, clBtnFace is used for the background and clBtnText is used for the text. For a smaller color distance, clInactiveCaption is used for the background and clInactiveCaptionText is used for the text.
When set to False, or when the control has Focus, the color in SelectedColor is used for the background in selected cells and the color assigned to Font is used for text.
The default value for the property is False. Changing the value for the property causes the control to be redrawn.
FadeUnfocusedSelection has no effect on cells which use a button-style editor; they are drawn using the style and color values needed for the button control.
FadeUnfocusedSelection is used in the PrepareCanvas method to assign the Brush and Font colors used on the Canvas.
This description is the one of Grids.TCustomGrid.FadeUnfocusedSelection.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
