Numbering

<< Click to Display Table of Contents >>

Navigation:  Programming > Create text under program control > Numbering >

Numbering

WPTools 8 (unlike previous versions) supports multiple outline styles used within the same document.

Internally the outlines lists use the abstract/override paradigm used in DocX as well.

 

To create a basic legal outline scheme by code use this code:

 

var styles : array[0..8] of TWPRTFNumberingStyle;

   grp : Integer;

begin

 grp := WPRichText1.NumberStyles.NewOutlineGroup(true, styles);

 WPRichText1.CurrAttr.NumberStyle := styles[0].id;

 WPRichText1.ReformatAll(true);

end;

 

 

grp is the group number used by the new styles. The array styles will be filled with references to the new numbering styles.