TdxHyperlinkMouseHoverEvent Type
The procedural type for hyperlink mouse hover events in DevExpress controls and their UI elements.
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 hyperlink mouse hover event. Cast this parameter value to the corresponding terminal control or UI element class to access all public API members. Refer to the following section for detailed information on Tip You can call the |
AArgs | TdxHyperlinkEventArgs | Provides access to information on the hyperlink mouse hover event that occurred in the UI element accessible through the For example, you can use |
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.
Accessible Event Parameters
The following parameters are accessible 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 mouse hover event (OnHyperlinkMouseEnter
orOnHyperlinkMouseLeave
):- Formatted Label Editors
- The actual
Sender
type is TdxFormattedLabel or TdxDBFormattedLabel. - Layout Control
Sender
is a terminal TdxCustomLayoutItem class descendant instance (at the layout item level) or a TdxLayoutControl instance (at the layout control level).
AArgs
Provides access to information related to the hyperlink mouse hover event that occurred and allows you to identify the target hyperlink in a formatted message, label, or UI element caption. For example, you can use
AArgs
.HyperlinkIndex andAArgs
.URI properties to identify the hovered hyperlink’s position and target URI.Refer to the TdxHyperlinkEventArgs class description for detailed information on all options accessible within a hyperlink mouse hover event handler.
Code Example: Display Target URIs of Hot-Tracked Hyperlinks in Layout Items
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 TdxHyperlinkMouseHoverEvent Type References
The following events reference the TdxHyperlinkMouseHoverEvent
procedural type:
- TdxCustomFormattedLabelProperties.OnHyperlinkMouseEnter
- Allows you to execute custom code when the mouse pointer moves into a hyperlink area defined in the formatted label.
- TdxCustomFormattedLabelProperties.OnHyperlinkMouseLeave
- Allows you to execute custom code when the mouse pointer leaves a hyperlink defined in the formatted label.
- TdxCustomLayoutItem.OnHyperlinkMouseEnter
- Allows you to execute custom code when the mouse pointer moves into a hyperlink area within the layout item’s caption.
- TdxCustomLayoutItem.OnHyperlinkMouseLeave
- Allows you to execute custom code when the mouse pointer leaves a hyperlink within the layout item’s caption.
- TdxCustomLayoutControl.OnHyperlinkMouseEnter
- Allows you to execute custom code when the mouse pointer moves into a hyperlink area within a layout item caption.
- TdxCustomLayoutControl.OnHyperlinkMouseLeave
- Allows you to execute custom code when the mouse pointer leaves a hyperlink within a layout item caption.