Back to Devexpress

TdxSpreadSheetContainer.Hyperlink Property

vcl-dxspreadsheetcore-dot-tdxspreadsheetcontainer-e9b9ed8a.md

latest3.1 KB
Original Source

TdxSpreadSheetContainer.Hyperlink Property

Provides access to the floating container’s hyperlink and its settings.

Declaration

delphi
property Hyperlink: TdxSpreadSheetHyperlink read; write;

Property Value

Type
TdxSpreadSheetHyperlink

Remarks

Use this property to create, customize, or destroy a hyperlink that uses the floating container as a hot area. If a hyperlink is associated with the floating container, it shows the hyperlink’s screen tip when the mouse pointer hovers over the container. A click on it activates the hyperlink.

The following code example demonstrates how to associate a hyperlink with a floating container:

delphi
var
  ATableView: TdxSpreadSheetTableView;
  APictureContainer: TdxSpreadSheetPictureContainer;
//...
  ATableView := dxSpreadSheet1.ActiveSheetAsTable;
  APictureContainer := ATableView.Containers.Add(TdxSpreadSheetPictureContainer) as TdxSpreadSheetPictureContainer; // Creates a picture container
//...
  APictureContainer.Hyperlink := ATableView.Hyperlinks.Add(Rect(-1, -1, -1, -1)); // Creates a new hyperlink and assigns it to the picture container
  APictureContainer.Hyperlink.Value := 'http://www.devexpress.com'; // Assigns the target URL to the hyperlink's reference
  APictureContainer.Hyperlink.ScreenTip := 'DevExpress Official Site'; // Assigns an optional screen tip
cpp
TdxSpreadSheetTableView *ATableView;
  TdxSpreadSheetPictureContainer *APictureContainer;
//...
  ATableView = dxSpreadSheet1->ActiveSheetAsTable;
  APictureContainer = static_cast<TdxSpreadSheetPictureContainer*>(ATableView->Containers->Add(__classid(TdxSpreadSheetPictureContainer))); // Creates a picture container
//...
  APictureContainer->Hyperlink = ATableView->Hyperlinks->Add(Rect(-1, -1, -1, -1)); // Creates a new hyperlink and assigns it to the picture container
  APictureContainer->Hyperlink->Value = "http://www.devexpress.com"; // Assigns the target URL to the hyperlink's reference
  APictureContainer->Hyperlink->ScreenTip = "DevExpress Official Site"; // Assigns an optional screen tip

Refer to the TdxSpreadSheetHyperlink class description for detailed information on hyperlinks and their settings.

Note

A floating container does not display a hyperlink’s anchor text, and ignores the TdxSpreadSheetHyperlink.DisplayText property value.

The Hyperlink property’s default value is nil (in Delphi) or nullptr /NULL (in C++Builder).

See Also

TdxSpreadSheetContainer Class

TdxSpreadSheetContainer Members

dxSpreadSheetCore Unit