I am trying to set the align property of a TMemo component in the Form through code.
When trying to set align for a TMemo I get the errors shown below.
When trying to set it straight from the code like:
I get the error below.
Compile Project, Target: /media/aruna/linux-next/home/DEMO/project1: Exit code 1, Errors: 1, Hints: 1
unit4.pas(36,25) Error: Incompatible type for arg no. 1: Got "Constant String", expected "TAlign"
control.inc(4038,20) Hint: Found declaration: SetAlign(TAlign);
This is trying to set align using a TCcomboBox:
Memo1.Align:=combobox1.Items.Strings[combobox1.ItemIndex];
I get the error below.
Compile Project, Target: /media/aruna/linux-next/home/DEMO/project1: Exit code 1, Errors: 1, Hints: 1
unit4.pas(38,60) Error: Incompatible type for arg no. 1: Got "AnsiString", expected "TAlign"
control.inc(4038,20) Hint: Found declaration: SetAlign(TAlign);
This works :
So how do I convert a 'Constant String' or 'Ansi String' to TAlign, please?
Thank you, Aruna