rvico TRichView Reference | TRichViewEdit

TCustomRichViewEdit.SetControlInfoEd

Top  Previous  Next

An editing-style method for changing properties of the ItemNo-th item of RichView, if this item is "inserted control".

procedure SetControlInfoEd(ItemNo: Integer;

  const AName: String; AVAlign: TRVVAlign;

  ATag: Integer);

Parameters:

ItemNo – index of the item. The item must be of control type (rvsComponent), 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.SetControlInfoEd (or use SetCurrentControlInfo).

AName – name of the item, any string without line break (CR, LF) characters. It can also be set using SetItemTextEd method. This is not a Name property of the control!

AVAlign – vertical alignment of this item, see TRVVAlign for possible options.

ATag tag of the item. Do not confuse with Tag property of the control! 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 GetControlInfo or GetItemTag for this item. The tag can also be set by  SetItemTagEd method.

 

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

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

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

When possible, use SetCurrentControlInfo instead of this method.

 

See also methods of TCustomRichView:

GetControlInfo;
GetItemStyle;
SetControlInfo.

See also methods:

SetCurrentControlInfo;
ResizeControl;
AdjustControlPlacement.

See also properties:

ItemCount.

See also:

Modifying RichView items;
Item types;
"Tags".


RichView © Sergey Tkachenko