Is it possible to configure Multicolor Multiline TMemo in Delphi XE2?.
When I am writing codes like :
procedure TForm1.BitBtn1Click(Sender: TObject);
var
FirstVariable, SecondVariable, ThirdVariable :BOOL;
begin
if FirstVariable then
begin
Memo1.Font.Color := clGreen;
Memo1.Lines.Add('FirstVariable = True');
end
else if SecondVariable then
begin
Memo1.Font.Color := clBlue;
Memo1.Lines.Add('SecondVariable = True');
end
else
begin
Memo1.Font.Color := clRed;
Memo1.Lines.Add('ThirdVariable = True');
end;
end;
font color for all the previously existing lines are getting changed according to condition of the variables.
Best Answer
No, it is not possible. But you can use a RICHEDIT control instead, e.g., the
TRichEdit
wrapper.