procedure TForm1.FormShow(Sender: TObject);
var
FP : TFontParams;
begin
FP.Style := [];
FP.Color := clBlack;
FP.VScriptPos := vpNormal;
FP.Size := FontSize;
RichMemo1.Clear;
RichMemo1.Append('A Link OK ? ');
InsertFontText(RichMemo1, 'A Link again.', FP, -1);
RichMemo1.SetLink(2, 4, True);
RichMemo1.SetLink(15, 4, True);
end;
procedure TForm1.RichMemo1LinkAction(Sender: TObject; ALinkAction: TLinkAction;
const info: TLinkMouseInfo; LinkStart, LinkLen: Integer);
begin
Showmessage('clicked ' + inttostr(LinkStart) + ' ' + inttostr(LinkLen));
end;