Skip to main content
A newer version of this page is available. .

TdxAlertWindowManager.OnHyperlinkClick Event

Allows you to handle a click on a hyperlink displayed in an alert window.

Declaration

property OnHyperlinkClick: TdxAlertWindowManagerHyperlinkClickEvent read; write;

Remarks

The OnHyperlinkClick event occurs every time a user activates a hyperlink in an alert window. You can handle this event to implement a custom response to hyperlink activation or prevent users from activating certain hyperlinks.

Example

The following code example prevents hyperlink activation if the clicked hyperlink in an alert window refers to an external web resource:

procedure TMyForm.dxAlertWindowManager1HyperlinkClick(
  Sender: TObject; const AURI: string; var AHandled: Boolean);
begin
  if ContainsText(AURI, 'http') then  // If the target URI includes the HTTP or HTTPS protocol
    AHandled := True; // Disables the hyperlink activation routine
end;

Refer to the TdxAlertWindowManagerHyperlinkClickEvent procedural type description for detailed information on parameters accessible within an OnHyperlinkClick event handler.

See Also