Skip to main content
All docs
V24.2

TdxCustomLayoutItem.OnHyperlinkMouseEnter Event

Allows you to execute custom code when the mouse pointer moves into a hyperlink area within the layout item’s caption.

Declaration

property OnHyperlinkMouseEnter: TdxHyperlinkMouseHoverEvent read; write;

Remarks

You can handle OnHyperlinkMouseEnter and OnHyperlinkMouseLeave events to track mouse pointer movement through hyperlinks defined in the layout item caption.

Layout Control and Layout Item Events

The layout control also declares OnHyperlinkMouseEnter and OnHyperlinkMouseLeave events that you can handle to track mouse movements through hyperlinks in all layout items. These events allow you to create common handlers instead of individual handlers for each layout item.

Event Occurrence

The OnHyperlinkMouseEnter event occurs every time the mouse pointer moves into a hyperlink area in the layout item caption.

Event Parameters

The following parameters are accessible within an OnHyperlinkMouseEnter event handler:

Sender
Provides access to the layout item that raised the hyperlink mouse enter event.
AArgs
Provides access to information related to the hyperlink mouse enter event that occurred and allows you to identify the target hyperlink in the layout item caption. For example, you can use AArgs.HyperlinkIndex and AArgs.URI properties to identify the hovered hyperlink’s position and target URI.

Refer to TdxHyperlinkMouseHoverEvent and TdxHyperlinkEventArgs type descriptions for detailed information on all options available within an OnHyperlinkMouseEnter 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;
See Also