I am using Delphi Berlin on Windows 10. I need to use tOpenDialog for tForm on tStringGrid.
When you double-click a file that overlaps a fixed column or row in an open dialog box, the FixedCellClick event fires automatically immediately after the open dialog disappears. In the following image, the file is in the same position as the fixed line, which is the first line.

type TForm1 = class(TForm) StringGrid1: TStringGrid; OpenDialog1: TOpenDialog; procedure FormClick(Sender: TObject); procedure StringGrid1FixedCellClick(Sender: TObject; ACol, ARow: Integer); procedure FormCreate(Sender: TObject); end; procedure TForm1.FormCreate(Sender: TObject); begin StringGrid1.Options := StringGrid1.Options + [goFixedColClick, goFixedRowClick]; end; procedure TForm1.FormClick(Sender: TObject); begin OpenDialog1.Execute; end; procedure TForm1.StringGrid1FixedCellClick(Sender: TObject; ACol, ARow: Integer); begin Caption := ''; end;
In most cases, I can handle this by moving the dialog box or clicking the file once and clicking the Open button, but I cannot guarantee that other people who will use it will do this.
What is the reason and how can I solve this problem?
source share