rvico TRichView Reference | TRVStyle | TParaInfos

TParaInfos.FindSuchStyle, FindSuchStyleEx

Top  Previous  Next

Searches for a style having properties like Style.

function FindSuchStyle(BaseStyle: Integer; Style: TParaInfo;

  Mask: TRVParaInfoProperties): Integer;

function FindSuchStyleEx(BaseStyle: Integer; Style: TParaInfo;

  Mask: TRVParaInfoProperties): Integer;

(Introduced in version 1.5 and version 14)

The BaseStyle-th style is checked first. BaseStyle is an index in Items.

Mask is a set of properties to compare (other properties are ignored). Use RVAllParaInfoProperties constant to compare all properties.

The following properties are ignored when comparing styles:


StyleName (if RichViewCompareStyleNames=False (default)).

If FindSuchStyle cannot find the desired style, it returns -1.

If FindSuchStyleEx cannot find the desired style, it adds a new style to the end of Items, assigns properties of Style to this new item, sets its Standard=False, returns the index of this new item.

Return value:

Index of the found style; FindSuchStyle returns -1 if not found.

See also methods:







Demos\Delphi\Editors\Editor 2\

Demos\CBuilder\Editors\Editor 2\

(see procedure TForm1.rveParaStyleConversion, rve.OnParaStyleConversion event)

TRichView © trichview.com