TdxCommonFormattedTextProperties.HyperlinkColor Property
Specifies the hyperlink color in formatted messages, labels, and UI element captions.
Declaration
property HyperlinkColor: TColor read; write; default clDefault;
Property Value
| Type | Default | Description |
|---|---|---|
| TColor | clDefault | The hyperlink color. |
Remarks
The hyperlink color depends on the active skin and palette. Use the HyperlinkColor property to assign a different color to all hyperlinks in a formatted message, label, or UI element caption.
Hyperlink Markup Syntax
Use the following BBCode-inspired markup syntax to define a hyperlink in a string assigned to a caption, label, or message:
[URL=https://www.devexpress.com]DevExpress[/URL]
Refer to the following topic for detailed information on all supported text formatting options: BBCode-Inspired Text Formatting Markup.
Hyperlink Activation
A hyperlink click opens the target in a new tab of the default system browser[1] or opens the default email client[2].
You can handle the OnHyperlinkClick event to execute custom code in response to a click on a hyperlink or prevent hyperlink activation depending on certain conditions.
Code Example: Add a Hyperlink to a Layout Item Caption
The following code example defines a layout item caption with custom formatting that includes a hyperlink:
uses
dxLayoutControl, // Declares the TdxLayoutControl class
dxLayoutContainer; // Declares the TdxLayoutItem class
// ...
procedure TMyForm.FormCreate(Sender: TObject);
begin
dxLayoutItem1.CaptionOptions.FormattedText.HyperlinkColor := clWebOrange;
dxLayoutItem1.CaptionOptions.Text := 'Visit [B]our page[/B]: ' +
'[URL=https://www.devexpress.com]DevExpress[/URL]';
end;
Default Value
The HyperlinkColor property’s default value is clDefault.
The default HyperlinkColor value indicates that the hyperlink color depends on the current skin and palette settings.