TrvActionInsertHyperlink.GoToLink

<< Click to display table of contents >>

TrvActionInsertHyperlink.GoToLink

These methods execute the given hyperlink.

procedure GoToLink(rve: TCustomRichViewEdit; id: Integer);
procedure GoToLink(rve: TCustomRichViewEdit;
  const Target: TRVUnicodeString);

The first version of the method should be called in rve.OnJump event:

procedure TForm3.RichViewEdit1Jump(Sender: TObject; id: Integer);

begin

  rvActionInsertHyperlink1.GoToLink(RichViewEdit1, id);

end;

The second version of this method can be called from rve.OnJump or from any place of code.

 

If the link's target (stored in its tag) is started from '#', the action moves the caret to the checkpoint of the same name (but without '#'). If ScrollToCenter = True, the bookmarked item is centered in the editor.

Otherwise, the action opens the link's target in external application (using ShellExecute function).

On error (no such checkpoint, or ShellExecute returned an error code), an error message is displayed.

See also:

GoToCheckpoint function