TTMXFMXGrid any way to turn focus rect off?

Is there any way to turn the focus rect off?

Is just does not look right to have a rectangle around a cell when rowselect is enabled.

Hi, 


Yes you can use the following code to accomplish this:

procedure TForm1.FormCreate(Sender: TObject);
begin
  TMSFMXGrid1.NeedStyleLookup;
  TMSFMXGrid1.ApplyStyleLookup;
  TMSFMXGrid1.SelectionMode := smSingleRow;
  TMSFMXGrid1.GetDefaultFocusedLayout.Layout.Stroke.Kind := TBrushKind.None;
end;

Does not work for me.

I have smDisjunctRow enabled, and when clicking a row, this crazy dotted focus rect is back again. No clue why there is a focus rect around a cell when smSingleRow or smDisjunctgRow is enabled. In that case, the focus rect should be at least around the whole row.

The focus rect is there to know which cell is going to be edited when pressing F2 or Enter.


Can you try with the following code instead:

procedure TForm1.TMSFMXGrid1ApplyStyleLookup(Sender: TObject);
begin
  TMSFMXGrid1.GetDefaultFocusedLayout.Layout.Stroke.Kind := TBrushKind.None;
end;

But if should not do that when the grid cannot be edited (read only for example).


i will check that and will report back.