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 docNumberingLevel variables
  • Adding a numbering description to a document
  • Adding a numbering level to a document
  • Using numberings created programmatically
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The docNumberingLevel type is used to define the advanced characteristics of a numbering level used in a Word Processing document. You can define and change the characteristics of this numbering level using different WLanguage properties.
This type is used by docNumbering variables.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
MonDoc is Document = TT_SansNom1
MaNumérotation is docNumbering
Niveau is docNumberingLevel

// Définition de la numérotation

// 1er niveau de la numérotation
Niveau.Text = "%1) "
Niveau.Text = "%1) "
Niveau.InitialValue = 1
Niveau.PageLayout.IndentFirstLine = 10
Niveau.Format = numfRomanUppercase
Add(MaNumérotation.Level, Niveau)

// Second niveau de la numérotation
Niveau.Text = "%2] "
Niveau.InitialValue = 1
Niveau.PageLayout.IndentFirstLine = 20
Niveau.Format = numfUppercaseLetter
Add(MaNumérotation.Level, Niveau)

// Troisième niveau de la numérotation
Niveau.Text = "%3\ "
Niveau.InitialValue = 1
Niveau.PageLayout.IndentFirstLine = 30
Niveau.Format = numfLowercaseLetter
Add(MaNumérotation.Level, Niveau)


// Ajout de la numérotation au document
let id = Add(MonDoc.Numbering, MaNumérotation)

// Définition de la numérotation associée au paragraphe 1
MonDoc.Paragraph[1].Numbering.Identifier = id
MonDoc.Paragraph[1].Numbering.Level = 1

// Affichage du document dans le champ Traitement de texte
TT_SansNom1 = MonDoc
Properties

Properties specific to docNumberingLevel variables

The following properties can be used to handle a numbering level:
Property nameType usedEffect
AlignmentInteger constantThe numbering is positioned in relation to the start position of the paragraph:
  • chCentre: Numbering is centred in relation to the beginning of the paragraph.
  • chRight: Numbering is positioned to the right of the beginning of the paragraph.
  • chLeft: Numbering is positioned to the left of the beginning of the paragraph.
FormatInteger constantFormatting for this level of numbering (digits, roman digits, letters, ...):
  • fnumLettreMajuscule: Numbering in capital letters: A, B, C, D, ...
  • fnumLettreMinaissuscule: Numbering in lowercase letters: a, b, c, d, ...
  • fnumNumeric: Numbering in digits: 1, 2, 3, 4, ...
  • fnumNumériqueEnLettres Numbering in numbers written in letters: one, two, three, four, ...
  • fnumOrdinal: Ordered numbering: 1st, 2nd, 3rd, ...
  • fnumOrdinalEnLettres: Numbering ordered in letters: first, second, third, ...
  • fnumPuce Numbering in bullet form. Only the bullets represented by a font character are available. You cannot create a bullet associated with an image.
  • fnumRomainMajuscule: Numbering in capital Roman numerals: I, II, III, ...
  • fnumRomainMinuscule: Numbering in lowercase Roman numerals: i, ii, iii, ...
FormattingdocFormatting variableParameters for numbering formatting.
PageLayoutLayout of numbered paragraph.
PageLayout.AlignmentInteger constantHorizontal alignment used for the numbered paragraph:
  • chCentre: Centred
  • chRight: Right-aligned
  • chLeft: Left-aligned
  • chJustified: Justified.
PageLayout.BorderBorder variableCharacteristics of border used for the numbered paragraph.
Note: rounded corners are not supported.
PageLayout.BackgroundColorIntegerBackground color of numbered paragraph. This color can correspond to:
PageLayout.SpacingAfterRealSpacing after the numbered paragraph (expressed in millimeters).
This property is set to 0 by default.
PageLayout.SpacingBeforeRealSpacing before the numbered paragraph (expressed in millimeters).
This property is set to 0 by default.
PageLayout.LineSpacingRealLine spacing (expressed in millimeters).
Used if the LineSpacingType property is set to lineSpacingExact or lineSpacingMinimum.
By default, this property is set to 0.
PageLayout.RightIndentRealRight indent of numbered paragraph (expressed in millimeters).
This property is set to 0 by default.
PageLayout.LeftIndentRealLeft indent of numbered paragraph (expressed in millimeters).
This property is set to 0 by default.
PageLayout.IndentFirstLineRealIndent of first line in numbered paragraph (expressed in millimeters).
This property is set to 0 by default.
PageLayout.CustomTabulationArray of docTabulationCustom tabulations of numbered paragraph.
PageLayout.BackgroundPatternBackground variableCharacteristics of the paragraph background.
PageLayout.LineSpacingTypeInteger constantType of line spacing used:
  • interligneExact The line spacing corresponds to the value of the Line spacing.
  • minimumline spacing The minimum line spacing corresponds to the value of the Line spacing. If the default line spacing of the font used on the previous line is greater than the LineSpacing property, the default line spacing of the font is used.
  • multiple line spacing (default value): Line spacing is obtained by multiplying the line spacing property by the default line spacing of the previous line's font and dividing by 240.
Note: in previous versions, this property was called InterlineType.
RestartAfterIntegerLevel after which the numbering must be reinitialized. This property can correspond to:
  • 0: numbering is never reset.
  • -1: numbering is reset as soon as a higher level is incremented.
  • an x value greater than 0: numbering is reset as soon as the x level is incremented.
SeparatorInteger constantType of separator used to perform the spacing between the paragraph numbering and the rest of text:
  • sepnumNo: No separator.
  • sepnumSpace: The separator is a space.
  • sepnumTabulation The separator is a tabulation.
TextCharacter stringNumbering to use. The % symbol followed by a digit will contain the numbering value for the level defined by this digit.
Examples:
  • "%1 )" uses the numbering of level 1 followed by a bracket.
  • "%1. %2" displays the numbering of level 1 followed by the numbering of level 2.
For a bulleted list, characters representing the requested bullet. This character will be displayed in the font selected for the numbering formatting.
Warning: The number of previous levels will be formatted as defined by the previous level unless the property TousEnChiffre property is set to True.
AllInDigitBoolean
  • True in order for all the level numbers (current level and previous levels) to be written in Arabic digits,
  • False to keep the characteristics of each level.
TplcCharacter stringSpecific identifier for MS Word.
This property is read-only.
InitialValueIntegerStart value of numbering (must be a positive integer).
Remarks

Adding a numbering description to a document

To add a numbering description to a document, you have the ability to use Add with the following syntax:
Add(MyDocument.Numbering, MyNumbering)
where:

Adding a numbering level to a document

To add a numbering level to a document, you have the ability to use Add with the following syntax:
Add(Numbering.Level, MyLevel)
where:
  • Numbering is a variable of type docNumbering.
  • MyLevel is a variable of type docNumberingLevel.

Using numberings created programmatically

The numberings created programmatically can be used via the ribbon. They appear in the ribbon, in the "Paragraphs" group, by expanding the Numbering option, in the "Document numbering" group.
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help