TCustomRichView.AddHotspot

<< Click to display table of contents >>

TCustomRichView.AddHotspot

Adds a hotspot (an image from TImageList hypertext link) to the end of document.

VCL and LCL:

procedure AddHotspot(const AName: TRVUnicodeString;
  ImageIndex, HotImageIndex: Integer; ImageList: TCustomImageList;
  ParaNo: Integer = -1; VAlign: TRVVAlign = rvvaBaseline; 

  const Tag: TRVTag = RVEMPTYTAG);

(changed in version 18)

FireMonkey:

procedure AddHotspot(const AName: TRVUnicodeString;
  ImageIndex, HotImageIndex: Integer; ImageList: TCustomImageList;
  ParaNo: Integer = -1; VAlign: TRVVAlign = rvvaBaseline; 

  const Tag: TRVTag = RVEMPTYTAG;

  ImageWidth: TRVStyleLength = 16;

  ImageHeight: TRVStyleLength = 16);

 

Alternatives:

If you want to add a simple (not a hyperlink) picture from image list, add a bullet instead.

If you want to add a picture-hyperlink, add a hot picture instead.

If you want to add a picture, add a picture instead.

 

Parameters:

AName name of hotspot, any string. AName must not contain CR and LF characters. TRichView does not use item names itself, they are for your own use.

ImageIndex index of image in ImageList.

HotImageIndex index of "hot" image in ImageList. It is displayed when the mouse pointer is above this hotspot.

ImageList image list for this hotspot. TRichView does not own, does not copy and does not destroy image lists, it just holds pointers to them. So this image list is not destroyed when the document is cleared.

If ParaNo=-1, the method adds an item to the end of the last paragraph. If ParaNo>=0, this item starts a new paragraph using attributes defined in Style.ParaStyles[ParaNo].

Tag tag of this hotspot.

Additional parameters for FireMonkey version:

ImageWidth, ImageHeight the desired size of the image. The component chooses the image that fits the specified size. The image is not scaled.

Methods type: viewerstyle viewer-style.

See also methods:

Format;

FormatTail;

SetAddParagraphMode.

See also methods of TRichViewEdit:

InsertHotspot.

See also properties of TRVStyle:

ParaStyles.

See also:

Item types;

Other methods for appending items;

"Tags";

Hypertext in RichView.


Related deprecated methods:

procedure AddHotspotExTag(const Name: TRVUnicodeString;

  ImageIndex, HotImageIndex: Integer;

  ImageList: TCustomImageList; ParaNo: Integer;

  const Tag: TRVTag);

procedure AddHotspotEx(const Name: TRVUnicodeString;

  ImageIndex, HotImageIndex: Integer;

  ImageList: TCustomImageList; ParaNo: Integer);

These methods provide subset of functionality of AddHotspot.