Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

hyperLink can't work in LMDrichedit?

Run the demo of hyperlink, Add Link can not work properly on delphi 12 and 13.
Older version done well on delphi 11.

Comments

  • 4 Comments sorted by Votes Date Added
  • edited December 2025 Posts: 0Vote Up0Vote Down
    Our pack now uses RichEdit 4, when possible (when installed on the system). It seems that explicit RichEdit.SelAttributes.Link no longer work when RichEdit.AutoURLDetect property is set to True. 
    You have to disable links auto detection by setting AutoURLDetect property to False.

    From MS docs:

    >> 
    When automatic link detection is enabled, the rich edit control removes the CFE_LINK effect from modified text that does not have a format recognized by the control. If your application uses the CFE_LINK effect to mark other types of text, do not enable automatic link detection.

  • The bug is the OnLinkClick can not be invoke,
    when you add hyperlink,always the OnURLclick be invoke.
  • There are two kinds of links:

    1) For links added with LMDRichHyperTextStorage.HyperText.InsertLink(
    False, URL) - OnURLClick will be fired on click.
    2) For links added with LMDRichHyperTextStorage.HyperText.InsertLink(True, URL) or for bookmarks - OnLinkClick will be fired on click.
  • Thank you for your answer.
Sign In or Register to comment.