rvico TRichView Reference | TRVStyle | TFontInfos

TFontInfos.FindStyleWithFontStyle

Top  Previous  Next

Searches for style having the specified font style.

function FindStyleWithFontStyle(BaseStyle: Integer; Value, Mask: TFontStyles): Integer;

(Introduced in version 1.3)

Searches for style having all properties of the BaseStyle-th style, but the font styles defined by Value and Mask.

Mask is a set of styles for check.

Value is a set of styles what must exist.

BaseStyle is an index in Items.

For example:

Mask = [fsBold], Value = [fsBold] searches for bold style (all other font styles are not checked).

Mask = [fsBold], Value = [] searches for not bold style (all other font styles are not checked).

The following properties are ignored when comparing styles:

Standard;

StyleName (if RichViewCompareStyleNames=False (default)).

Return value:

Index of style, or -1 if not found.

See also:

other TFontInfos.Find*** methods; the most universal method is FindSuchStyle;

TFontInfo.IsEqual.


TRichView © trichview.com