NumberLevel Property

[Top]  [Chapter]  [Previous]  [Next]

Applies to

IWPParInterface                                                workswithseltext

Declaration

int NumberLevel;

Description

The outline level of this style or paragraph. Possible values are between 0 and 9. 0 disables the outline mode.

The number level can also be modified using property ID WPAT_NumberLevel.

 

Example:

   IWPTextCursor Cursor = rtF2PDF1.Memo.TextCursor;

   IWPParInterface Par =  rtF2PDF1.Memo.CurrPar;

 

   IWPNumberStyle NStyle = rtF2PDF1.Memo.GetNumberStyle(001);

   NStyle.ASet((int)WPAT.NumberMODE,1); // Arabic

   rtF2PDF1.ReleaseInt(NStyle);

 

   Cursor.InputText("This is the first outline");

   Cursor.InputParagraph(0,"");

   for (int i = 0; i < 10; i++)

   {

               Cursor.InputText("List Item " + i.ToString());

               Par.NumberLevel=1;

               Cursor.InputParagraph(0,"");

   }

   Par.NumberMode = 0;

 

   Cursor.InputText("This is the second outline");

   Cursor.InputParagraph(0,"");

 

   for (int i = 0; i < 10; i++)

   {

               Cursor.InputText("List Item " + i.ToString());

               Par.NumberLevel=1;

               // The following code makes sure the numbering is restarted

               if (i==0)

               Par.ParASet((int)WPAT.NumberStart, 1);

               Cursor.InputParagraph(0,"");

   }

   Par.NumberMode = 0;


[idh_iwpparinterface_numberlevel_.htm]    Copyright © 2007 by WPCubed GmbH