| BeforeInitializePar Event |
Applies to
TWPRichText
Declaration
TWPInitializeParEvent = Procedure(Sender: TObject; RTFEngine: TWPRTFEngineBasis; RTFDataBlock: TWPRTFDataBlock; par: TParagraph) of object;
Description
This event is triggered before a paragraph is initialized. This happens after each change in the paragraph. This event makes it possible to prepocess the paragraph, for example to hide it "include(par.prop, paprHidden)" or to change the attributes depending on the contents of the paragraph.
This example hides paragraphs which contain empty merge fields and spaces only:
if par.HasObjects(false,[wpobjMergeField]) and
not par.IsNonSpace([wpobjMergeField]) then
include(par.prop, paprHidden)
else exclude(par.prop, paprHidden); |
|
Copyright (C) by WP |