[SOLVED] DBGrid remove red rectangle selection lazarus / 16-Databases ---------------------------------------------------------------------- Pe3s · 2022-12-06 16:58 Hello, is it possible to remove the red rectangle from the active selection? ---------------------------------------------------------------------- Nicole · 2022-12-06 17:57 yes write into the event DBGrid1ColumnCell(Sender: TObject;    const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i       if (gdSelected in State) then Canvas.Font.Color:= clBlue; ---------------------------------------------------------------------- dsiders · 2022-12-06 20:29 Quote from: Pe3s on December 06, 2022, 05:58:25 pmHello, is it possible to remove the red rectangle from the active selection? The focus rectangle gets drawn when DefaultDrawing is enabled. You can turn DefaultDrawing off and provide you own OnDraw* handlers. Or you can change FocusColor to a color more pleasing to you. ---------------------------------------------------------------------- paweld · 2022-12-06 22:18 https://lazarus- ccr.sourceforge.io/docs/lcl/grids/tcustomgrid.focusrectvisible.html Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i DBGrid1.FocusRectVisible := Fasle; ---------------------------------------------------------------------- Pe3s · 2022-12-08 05:56 Thank you