rvico TRichView Reference | TRichViewEdit

TCustomRichViewEdit.InsertItem

Top  Previous  Next

Inserts item in the position of caret.

function InsertItem(const Name: String;

  Item: TCustomRVItemInfo): Boolean;

(introduced in version 1.4)

This is the most general method for inserting items. It can be used to insert items of custom types.

This method is usually used for inserting tables, labels, sequences, footnotes, endnotes, references to notes.

 

The detailed description of item types is beyond the scope of this help file. Briefly, standard item types are declared and implemented in RVItem unit. All item types are classes derived from one base class – TCustomRVItemInfo.

Parameters:

Text – some text associated with this item (the name of item). It must not contain CR and LF characters.

Item – item itself. Item.ParaNo defines paragraph style of item (index in Style.ParaStyles).

 

Method type: editstyle editing-style method for insertion.

unicode Unicode note: for Delphi/Unicode 2009 or newer, Text is Unicode string; for the older versions of Delphi/C++Builder, Text is ANSI string. It is converted to ANSI/Unicode, if necessary. Names of non-text items are ANSI strings.

 

Return value:

If True, the item was inserted successfully.

If False, the item can not be inserted (because text is read-only or protected, or when inserting in table having multicell selection); in this case Item was destroyed (freed) by InsertItem.

 

See also methods of TCustomRichView:

AddItem.

See also:

Inserting items in position of caret;

Item types.


TRichView © trichview.com