TCustomRichViewEdit.InsertControl

<< Click to display table of contents >>

TCustomRichViewEdit.InsertControl

Inserts a Delphi/C++Builder control at the position of the caret.

function InsertControl(const Name: TRVUnicodeString; ctrl: TControl;

  VAlign: TRVVAlign): Boolean;

(changed in version 18)

Parameters:

Name name of this control item, any string. Name must not contain CR and LF characters. TRichView does not use item names itself, they are for your own use. Do not confuse with ctrl.Name property.

ctrl control to insert. By default, this control will be owned by TRichViewEdit control, and you must not free it. However, you can specify nonzero rvepShared extra item property, and this control will be shared (you need to free it yourself after TRichView is cleared).

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

 

Method type: editstyle editing-style method for insertion.

Return value

True if the insertion was successful (it can fail due to protection, or when inserting in table having multicell selection). If insertion failed, TRichViewEdit destroys ctrl.

See also methods of TCustomRichView:

AddControl;

See also:

Inserting items at position of caret;

Item types.