rvico TRichView Reference | TRichView

TCustomRichView.SetItemTag

Top  Previous  Next

Changing tag of the ItemNo-th item

procedure SetItemTag(ItemNo: Integer; ATag: Integer);

Items are indexed from 0 to ItemCount-1. Items of subdocuments (table cells) are not included in the items range of the main document; for items in cells, use Cell.GetRVData.SetItemTag.

Method type: viewerstyle viewer-style. Reformatting or repainting is not necessary.

Tag can be an integer value or a pointer to dynamically allocated string, see Tags.

 

Example

// if not (rvoTagsArePChars in RichView1.Options)

RichView1.SetItemTag(ItemNo, 1)

// if rvoTagsArePChars in RichView2.Options

RichView1.SetItemTag(ItemNo, Integer(StrNew('tag #1')));

 

See also methods:

GetItemTag.

See also properties:

ItemCount.

See also methods of RichViewEdit:

SetItemTagEd;
SetCurrentTag.

See also:

Modifying RichView items;
Tags.


RichView © Sergey Tkachenko