Please consider this simplified example:
type TForm43 = class(TForm) drwgrd1: TDrawGrid; procedure drwgrd1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: Windows.TRect; State: TGridDrawState); private { Private declarations } public { Public declarations } end; procedure TForm43.drwgrd1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: Windows.TRect; State: TGridDrawState); begin Rect.Left := 5; end;
In the drwgrd1DrawCell method drwgrd1DrawCell I explicitly used Windows.TRect to resolve the beetween TRect ambiguity defined in two different units. Everything works fine, the code compiles. But every time I save the above item, I ask a question from the Delphi IDE, which asks: "The drwgrd1DrawCell method referenced by drwgrd1.OnDrawCell has an incompatible list of parameters. Delete the link?"
This is very annoying. Is there a way to disable this message dialog box or write my code so that it does not appear? Unfortunately, I cannot change my TRect to TRect2 or anything like that.
Wodzu source share