rvico TRichView Reference | TRichView

TCustomRichView.AddControlEx, AddControlExTag

TCustomRichView.AddControl (deprecated)

Top  Previous  Next

These methods add Delphi control to the end of document.

procedure AddControlExTag(const Name: TRVAnsiString; ctrl: TControl;

  ParaNo: Integer; VAlign: TRVVAlignconst Tag: TRVTag);

 

procedure AddControlEx(const Name: TRVAnsiString; ctrl: TControl;

  ParaNo: Integer; VAlign: TRVVAlign);

procedure AddControl(ctrl: TControl; center: Boolean); deprecated;

AddControlEx provides a subset of functionality of AddControlExTag:

AddControlEx(...) is equivalent to AddControlExTag(..., '')

AddControl is deprecated and maintained for backward compatibility (with TRichView versions prior to 1.0):

AddControl(ctrl, True) is equivalent to AddControlEx('', ctrl, 1, rvvaBaseline);

AddControl(ctrl, False) is equivalent to AddControlEx('', ctrl, 0, rvvaBaseline).

 

Parameters:

Name – name of this control item, any string. Name must not contain CR and LF characters. RichView does not use Names itself, they are for your own use. This is an ANSI string, regardless of Unicode mode of text styles. Do not confuse with ctrl.Name property.

ctrl – control to insert.

VAlign – vertical align of this control, relative to its line, see TRVVAlign for possible values.

If ParaNo=-1, the methods add the item to the end of the last paragraph. If ParaNo>=0, this item starts a new paragraph with the ParaNo-th style. (ParaNo is an index in the ParaStyles collection of the linked RVStyle component). It defines attributes for the new paragraph.

Tagtag of this control item. Do not confuse with ctrl.Tag property.

 

Methods type: viewerstyle viewer-style.

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

See also methods:

Format;

FormatTail;

SetAddParagraphMode.

See also methods of TRichViewEdit:

InsertControl.

See also properties of TRVStyle:

ParaStyles.

See also:

Item types;

Other methods for appending items;

"Tags".


TRichView © trichview.com