PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Properties specific to the description of docTableOfContents variables
  • Various
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
docTableOfContents (Type of variable)
In french: docTableDesMatières
The docTableOfContents type is used to define all the options to generate a table of contents in a Word Processing document. The characteristics of this table of contents can be defined and modified using different WLanguage properties.
Remark: See Declaring a variable for more details on the declaration of this type of variable and the use of WLanguage properties.
Example
doc is Document
...
// Define the table of contents
toc is docTableOfContents
tdm.withPageNumber = True
 
// Paragraphs that use the default style for level 1 (Heading 1)
// are used for level 1 entries in the table of contents
tdm.StylesPerLevel[1] = styleTOCDefault1
 
// Paragraphs that use the default style for level 2 (Heading 2)
// and the paragraphs that use "MyCustomStyle"
// are used for level 2 entries in the table of contents
tdm.StylesPerLevel[2] = styleTOCDefault2 + RC + "MyStylePerso"
 
// Paragraphs that use "MyCustomStyle3"
// are used for level 3 entries in the table of contents
tdm.StylesByLevel[3] = "MyStylePerso3"
 
// Insert table of contents at the beginning of the document
fDocBeginning is docFragment = doc[1 ON 0]
DocInsert(fDocBeginning, toc)
Remarks

Properties specific to the description of docTableOfContents variables

The following properties can be used to handle a table of contents:
Property nameType usedEffect
WithPageNumberBoolean
  • True if the page number must be displayed on each line of the table of contents,
  • False otherwise.
StylesPerLevelArray of stringsUsed to specify the style(s) to use when generating the corresponding level in the table of contents.
If various styles are used, they must be separated by CR (Carriage Return).
You can use:
  • one or more custom styles,
  • the constants corresponding to the default styles:
    • styleTOCDefault1: Default paragraph style for level 1 of the table of contents (Heading 1).
    • styleTOCDefault2: Default paragraph style for level 2 of the table of contents (Heading 2).
    • styleTOCDefault3: Default paragraph style for level 3 of the table of contents (Heading 3).
    • styleTOCDefault4: Default paragraph style for level 4 of the table of contents (Heading 4).
    • styleTOCDefault5: Default paragraph style for level 5 of the table of contents (Heading 5).
    • styleTOCDefault6: Default paragraph style for level 6 of the table of contents (Heading 6).
    • styleTOCDefault7: Default paragraph style for level 7 of the table of contents (Heading 7).
    • styleTOCDefault8: Default paragraph style for level 8 of the table of contents (Heading 8).
    • styleTOCDefault9: Default paragraph style for level 9 of the table of contents (Heading 9).

Various

DocInsert can be used to add a table of contents to the document.
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment