TRVStyle.OnApplyStyle

<< Click to display table of contents >>

TRVStyle.OnApplyStyle

Occurs when RichView applies attributes of the StyleNo-th style to Canvas.

property OnApplyStyle: TRVApplyStyleEvent;

VCL and LCL:

type

  TRVApplyStyleEvent =

    procedure (Sender: TRVStyle; ACanvas: TCanvas; 

      StyleNo: Integer; PSaD: PRVScreenAndDevice;

      var DoDefault: Boolean) of object;

(introduced in version 1.3; modified in v18)

FireMonkey:

type

  TRVApplyStyleEvent =

    procedure (Sender: TRVStyle; ACanvas: TRVFMXCanvas

      StyleNo: Integer; PSaD: PRVScreenAndDevice;

      var DoDefault: Boolean) of object;

(introduced in version 1.3; modified in v18)

In this event you can apply font (excluding colors) for the text style StyleNo to Canvas.

Nothing should be drawn inside this event.

Input parameters:

Sender – TRVStyle generating this event;

Canvas – canvas for applying font attributes to.

PSaD – pointer to a record used for conversion between TRVStyleLength values and device pixels. It may be nil when applying to the screen.

DoDefault is equal to True.

Output parameters:

DoDefault – set to False to prevent the default style applying procedure and OnAfterApplyStyle event.

 

See also:

OnApplyStyleColor;

OnDrawStyleText.

See also properties:

TextStyles.