Skip to main content
All docs
V26.1
  • TdxHyperlinkMouseHoverEvent Type

    The procedural type for hyperlink mouse hover events in DevExpress controls with support for BBCode-inspired text formatting markup.

    Declaration

    TdxHyperlinkMouseHoverEvent = procedure(Sender: TObject; AArgs: TdxHyperlinkEventArgs) of object;

    Parameters

    Name Type Description
    Sender TObject

    Provides access to the control or UI element that raised the event.

    Cast this parameter value to the corresponding terminal control or UI element class to access its public API members. Refer to the following section for detailed information on Sender types in different DevExpress products: Available Event Parameters.

    Tip

    Call the Sender.ClassType function or use other RTTI functionality to identify the actual control or UI element type.

    AArgs TdxHyperlinkEventArgs

    Contains information about the event raised by the UI element available through the Sender parameter.

    For example, you can use AArgs.AnchorText and AArgs.URI properties to identify the target hyperlink’s anchor text and URI.

    Remarks

    You can handle hyperlink mouse hover events to track movements of the mouse pointer between hyperlinks defined in a formatted message, label, or UI element caption in a DevExpress control with support for BBCode-inspired text formatting markup.

    Available Event Parameters

    The following parameters are available within a hyperlink mouse hover event handler:

    Sender

    Provides access to the control or UI element that raised the hyperlink hover event. The Sender parameter type depends on the class that declares the corresponding OnHyperlinkMouseEnter event:

    AArgs

    Contains information about the hyperlink mouse hover event and allows you to identify the target hyperlink within a formatted message, label, or UI element caption. For example, you can use AArgs.HyperlinkIndex and AArgs.URI properties to identify the hovered hyperlink’s position and target URI.

    Refer to the TdxHyperlinkEventArgs class description for detailed information on all options available within a hyperlink mouse hover event handler.

    The code example in this section demonstrates OnHyperlinkMouseEnter and OnHyperlinkMouseLeave event handlers that update the form caption as the mouse pointer moves between layout item hyperlinks.

    The OnHyperlinkMouseEnter event handler displays the target URI of a hyperlink in the form caption when the mouse pointer enters the hyperlink’s area. The OnHyperlinkMouseLeave event handler changes the form caption to a predefined string when the mouse pointer leaves a hyperlink.

    Tip

    This scenario can be useful if you need to display hyperlink targets without hints (if the CaptionOptions.ShowHyperlinkHint property is set to bFalse, for example).

    procedure TMyForm.dxLayoutControl1Item1HyperlinkMouseEnter(Sender: TObject;
      AArgs: TdxHyperlinkEventArgs);  // Displays the hyperlink target in the form caption
    begin
      Caption := 'Navigate to ' + AArgs.URI;
    end;
    
    procedure TMyForm.dxLayoutControl1Item1HyperlinkMouseLeave(Sender: TObject;
      AArgs: TdxHyperlinkEventArgs);  // Displays the predefined string instead of a hyperlink target
    begin
      Caption := 'Hyperlink Navigation in Layout Item Captions';
    end;
    

    Direct Type References

    The following events reference the TdxHyperlinkMouseHoverEvent procedural type:

    TdxFormattedTextPropertiesBase.OnHyperlinkMouseEnter
    Allows you to execute custom code when the mouse pointer moves into a hyperlink area.
    TdxFormattedTextPropertiesBase.OnHyperlinkMouseLeave
    Allows you to execute custom code when the mouse pointer leaves a hyperlink area.
    See Also