rvico TRichView Reference | TRichView

TCustomRichView.SetBulletInfo

Top  Previous  Next

Changes main properties of the item of bullet (image from ImageList) type.

procedure SetBulletInfo(ItemNo: Integer; const AName: String;

  AImageIndex: Integer; AImageList: TCustomImageList;

  ATag: Integer);

Parameters:

ItemNo – index of the item. The item must be of bullet or hotspot type (rvsBullet or 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.SetBulletInfo.

AName – name of bullet, 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.

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 GetBulletInfo or GetItemTag for this item. The tag can also be set by SetItemTag method.

 

Method type: viewerstyle viewer-style. It's not necessary to reformat document after it, repainting is enough.

Additional item properties are assigned by the methods SetItemExtraIntProperty and SetItemExtraStrProperty.

unicode Unicode note: names of non-text items are ANSI strings.

 

Example

// if not (rvoTagsArePChars in RichView1.Options)

RichView1.SetBulletInfo(ItemNo, 'my image'0nil1)

// if rvoTagsArePChars in RichView2.Options

RichView1.SetBulletInfo(ItemNo, 'my image'0nil, Integer(StrNew('bullet tag')));

 

See also methods:

GetBulletInfo;
GetItemStyle;
SetItemExtraIntProperty;
SetItemExtraStrProperty.

See also properties:

ItemCount.

See also methods of RichViewEdit:

SetBulletInfoEd;
SetCurrentBulletInfo.

See also:

Modifying RichView items;
Item types;
Tags.


RichView © Sergey Tkachenko