ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Word Processing functions / Types of variables
  • Properties specific to docTableOfContents variables
  • Miscellaneous
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
docTableOfContents (Variable type)
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. You can define and change the characteristics of this table of contents using different WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
doc is Document
...
// Définition de la table des matières
tdm is docTableOfContents
tdm.WithPageNumber = True

// Les paragraphes utilisant le style par défaut de niveau 1 (Titre 1) 
// sont utilisés pour les entrées de niveau 1 de la table des matières
tdm.StylesPerLevel[1] = styleTOCDefault1

// Les paragraphes utilisant le style par défaut de niveau 1 (Titre 2) 
// et les paragraphes utilisant le style "MonStylePerso"
// sont utilisés pour les entrées de niveau 2 de la table des matières
tdm.StylesPerLevel[2] = styleTOCDefault2 + CR + "MonStylePerso"

// Les paragraphes utilisant le style perso "MonStylePerso3"
// sont utilisés pour les entrées de niveau 3 de la table des matières
tdm.StylesPerLevel[3] = "MonStylePerso3"

// Insère la table des matières au début du document
fDébutDoc is docFragment = doc[1 ON 0]
DocInsert(fDébutDoc, tdm)
Properties

Properties specific to docTableOfContents variables

The following properties can be used to handle a table of contents:
Property nameType usedEffect
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:
    • styleTDMDefault1: Default paragraph style for level 1 of table of contents (Heading 1).
    • styleTDMDéfaut2: Default paragraph style for level 2 of table of contents (Title 2).
    • styleTDMDefault3: Default paragraph style for level 3 of table of contents (Heading 3).
    • styleTDMDéfaut4: Default paragraph style for level 4 of table of contents (Title 4).
    • styleTDMDefault5: Default paragraph style for level 5 of table of contents (Heading 5).
    • styleTDMDefault6: Default paragraph style for level 6 of table of contents (Heading 6).
    • styleTDMDefault7: Default paragraph style for level 7 of table of contents (Heading 7).
    • styleTDMDefault8: Default paragraph style for level 8 of table of contents (Heading 8).
    • styleTDMDefault9: Default paragraph style for table of contents level 9 (Heading 9).
WithPageNumberBoolean
  • True if the page number must be displayed on each line of the table of contents,
  • False otherwise.
Remarks

Miscellaneous

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

Last update: 09/20/2024

Send a report | Local help