TCustomRichView.AddHotspot

<< Click to display table of contents >>

TCustomRichView.AddHotspot

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

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

  const Tag: TRVTag = RVEMPTYTAG);

(changed in version 18)

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 TGraphic picture-hyperlink, add a hot picture instead.

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

 

Parameters:

Name name of hotspot, any string. Name 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.

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.