TCustomRichViewEdit.SetPictureInfoEd

<< Click to display table of contents >>

TCustomRichViewEdit.SetPictureInfoEd

An editing-style method for changing properties of the ItemNo-th item of RichView, if this item is a picture or hot-picture.

procedure SetPictureInfoEd(ItemNo: Integer; const AName: TRVUnicodeString;

  Agr: TRVGraphic; AVAlign: TRVVAlignconst ATag: TRVTag);

(changed in version 18)

Parameters:

ItemNo index of the item. The item must be of picture or hot-picture type (rvsPicture or rvsHotPicture), 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, activate inplace-editor, select the proper item in the cell  (SelSelectionBounds), and call SetPictureInfoEd of this inplace-editor. Alternatively, you can use SetCurrentPictureInfo.

AName name of the item, any string without line break (CR, LF) characters. It can also be set using SetItemTextEd method.

Agr graphic object. If this item does not use a shared image (by default), Agr must be an unique graphic object (you cannot assign the same graphic object to two or more items) or the value returned by GetPictureInfo for this item (the image is shared if rvepShared extra item property is nonzero). If this item does not use a shared image, and Agr is not equal to the value returned by GetPictureInfo for this item, the previously used graphic object is freed.

AVAlign vertical alignment of the picture.

ATag tag of the item. You can use value returned by GetPictureInfo or GetItemTag for this item. The tag can also be set by SetItemTagEd method.

 

Method type: editstyle editing-style (unlike SetPictureInfo).

Additional item properties are assigned by the methods SetItemExtraIntPropertyEd and SetItemExtraStrPropertyEd.

When possible, use SetCurrentPictureInfo instead of this method.

 

See also methods of TCustomRichView:

GetPictureInfo;

GetItemStyle;

SetPictureInfo.

See also methods:

SetCurrentPictureInfo.

See also properties:

ItemCount.

See also:

Modifying RichView items;

Item types;

"Tags".