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 Tip Call the |
| AArgs | TdxHyperlinkEventArgs | Contains information about the event raised by the UI element available 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 with support for BBCode-inspired text formatting markup.
Available Event Parameters
The following parameters are available within a hyperlink mouse hover event handler:
SenderProvides access to the control or UI element that raised the hyperlink hover event. The
Senderparameter type depends on the class that declares the correspondingOnHyperlinkMouseEnterevent:AArgsContains 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 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 available 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 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.