Is there a way to change the property of a TImage
which is stored in a variable?
I have a function that writes the Name
propery of a TImage
in the FigureSelectedName
variable, and it writes the field Name in the FieldSelected
variable.
Now my problem is:
FieldSelectedName.top
FieldSelectedName.left
This gives a error in Delphi (Illegal qualifier)
function moveFigure(FigName:String; FieldName:String):boolean;
var
x:Integer;
y:Integer;
begin
if (FigureSelected=true) and (FieldSelected=true) then
begin
x := strtoint(FieldSelectedName[2]);
y := Ord(FieldSelectedName[1])-64;
FigureSelectedName.top := 80 + (x * 70);
FigureSelectedName.left := 80 + (y * 70);
end;
end;