Selecting the contents of a cell in an FMX Stringgrid in the same way as you can "SelectAll" in an Edit box

104 views Asked by At

I have a firemonkey application and been using Delphi 10.2 for some years now. Whenever you selected the contents of a cell in a StringGrid it automatically selected the entire contents of the cell, thereby allowing you to start typing and overwriting the contents immediately.
I have just upgraded to Delphi 12 (FMX) and when you select a StringGrid cell it no longer automatically selects the entire contents, meaning you have to swipe over the contents to select them first.
Is there any way to automatically select the contents?

Thanking you in advance

My grid options were set to the following in both 10.2 and 12

Procedure TForm1.SetStringGridDefaults(var Grid : TStringGrid);

begin
    StringGrid.Options:=[TGridOption.AlternatingRowBackground,
                         TGridOption.Editing,
                         TGridOption.ColumnResize,
                         TGridOption.ColLines,
                         TGridOption.RowLines,
                         TGridOption.Tabs,
                         TGridOption.Header];
end;

I have tried playing around with the TGridOption.AlwaysShowEditor, TGridOption.AlwaysShowSelection, and TGridOption.CancelEditingByDefault options as well to no avail.

Any help would be appreciated

0

There are 0 answers