TdxFormattedTextPropertiesBase.OnHyperlinkClick Event
Allows you to respond to a click on a hyperlink or prevent hyperlink activation.
Declaration
property OnHyperlinkClick: TdxHyperlinkClickEvent read; write;
Remarks
A click on a hyperlink defined in a formatted message, label, or UI element caption opens the target in the default application associated with the hyperlink’s URI scheme, such as a browser for HTTP and HTTPS or a mail client for MAILTO.
Handle the OnHyperlinkClick event to execute custom code when a user clicks a hyperlink, or to prevent hyperlink activation based on conditions in your application.
Event Occurrence
The OnHyperlinkClick event occurs every time a user clicks a hyperlink in a formatted message, label, or UI element caption.
Event Parameters
The following parameters are available within an OnHyperlinkClick event handler:
Sender- Allows you to access the control or UI element that raised the hyperlink click event.
AArgs- Allows you to access information about the hyperlink click event that occurred and allows you to prevent hyperlink activation.
You can use
AArgs.Button andAArgs.Shift properties to identify the clicked mouse button and the state of modifier keys at the moment of event occurrence.
Refer to TdxHyperlinkClickEvent and TdxHyperlinkClickEventArgs type descriptions for detailed information on all options available within an OnHyperlinkClick event handler.
Related Mouse Movement Events
In addition, you can handle the following events to track mouse movement between hyperlinks in a label, caption, or message:
- OnHyperlinkMouseEnter
- Allows you to execute custom code when the mouse pointer moves into a hyperlink area.
- OnHyperlinkMouseLeave
- Allows you to execute custom code when the mouse pointer leaves a hyperlink area.