|
TCustomRichView.SetHotspotInfo |
Top Previous Next |
|
Changes main properties of the item of hotspot (image from ImageList, hyperlink) type. procedure SetHotspotInfo(ItemNo: Integer; const AName: String; AImageIndex, AHotImageIndex: Integer; AImageList: TCustomImageList; ATag: Integer); Parameters: ItemNo – index of the item. The item must be of hotspot type (rvsHotspot), otherwise the method raises ERichViewError exception. Items are indexed from 0 to ItemCount-1, GetItemStyle returns type of item. Items of subdocuments (table cells) are not included in the items range of the main document; for items in cells, use Cell.GetRVData.SetHotspotInfo. AName – name of hotspot, any string without line break (CR, LF) characters. It can also be set using SetItemText method. AImageList – not used, reserved, set it to nil.. AImageIndex – index of image in image list. AImageIndex – index of "hot" image in image list. This image is displayed under the mouse pointer (in TRichView, or in TRichViewEdit in hypertext mode), or when user moves the caret to this item (in TRichViewEdit). ATag – tag of the item.If tags are pointers to dynamically allocated strings (rvoTagsArePChars in Options), this parameter must be set to value returned by StrNew of StrAlloc functions, typecasted to integer. You can use value returned by GetHotspotInfo or GetItemTag for this item. The tag can also be set by SetItemTag method.
Method type: Additional item properties are assigned by the methods SetItemExtraIntProperty and SetItemExtraStrProperty.
Example // if not (rvoTagsArePChars in RichView1.Options) RichView1.SetHotspotInfo(ItemNo, 'my image', 0, 0, nil, 1) // if rvoTagsArePChars in RichView2.Options RichView1.SetHotspotInfo(ItemNo, 'my image', 0, 0, nil, Integer(StrNew('hotspot tag')));
See also methods: See also properties: See also methods of RichViewEdit: See also:
|