TFontInfos.Items

<< Click to display table of contents >>

TFontInfos.Items

Provides indexed access to the items in the collection of text attributes (styles)

property Items[Index:Integer]: TFontInfo;

This is the default property of TFontInfos, so you can write

MyRVStyle.TextStyles[i]

instead of

MyRVStyle.TextStyles.Items[i]

Many methods of components inherited from TCustomRichView have StyleNo parameter, which is an index in TFontInfos.Items collection (more specifically, in TCustomRichView.Style.TextStyles.Items).

Example:

  MyRichView.AddNL('Hello'00);

Unlike normal collections, when accessing item with invalid Index (for example, Index<0 or Index>=Count), no exception occurs. InvalidItem is returned instead.