procedure TFrm_PrtTest.SetColor(SelectStr: string);
begin
if Trim(SelectStr)<>'' then
begin
Memo1.SelStart := Length(Memo1.Text) - Length(SelectStr)-2;
Memo1.SelLength:= Length(SelectStr);
Memo1.SelAttributes.Color := clRed;
end;
end;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/166523/viewspace-1133937/
,如需转载,请注明出处,否则将追究法律责任。