Gets or sets the text that is displayed in front of the number in a numbered list. If this property is an empty string, no additional text is diplayed in front of the number. This property replaces the CharBeforeNumber property of this class.

Introduced: 15.0.

Syntax

public string TextBeforeNumber { get; set; }
Public Property TextBeforeNumber() As String

Examples

The following example sets the 'TextBeforeNumber' property to an empty string. This means that no additional text is displayed in front of the number.

TXTextControl.ListFormat lf = new TXTextControl.ListFormat();
lf.Type = TXTextControl.ListType.Numbered
lf.FirstNumber = 5;
lf.FontName = "Calibri";
lf.BulletCharacter = '>';
lf.BulletSize = 12;
lf.FormatCharacter = TXTextControl.ListFormatCharacter.Tab;
lf.HangingIndent = 370;
lf.LeftIndent = 10;
lf.Level = 2;
lf.RestartNumbering = false;
lf.TextBeforeNumber = ""; //empty string = no additional text is displayed in Front of the number

textControl1.Selection.ListFormat = lf;
Dim lf As TXTextControl.ListFormat = New TXTextControl.ListFormat()
lf.Type = TXTextControl.ListType.Numbered
lf.FirstNumber = 5
lf.FontName = "Calibri"
lf.BulletCharacter = ">"c
lf.BulletSize = 12
lf.FormatCharacter = TXTextControl.ListFormatCharacter.Tab
lf.HangingIndent = 370
lf.LeftIndent = 10
lf.Level = 2
lf.RestartNumbering = False
lf.TextBeforeNumber = "" ' empty string = no additional text is displayed in Front of the number

TextControl1.Selection.ListFormat = lf

Remarks

The property returns an empty string when the text selection contains multiple paragraphs with mixed settings or when the text selection does not contain a numbered list. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.