NumberFormat Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
Gets or sets the number format for a numbered list. The property's value is a member of the NumberFormat enumeration.
Syntax
public NumberFormat NumberFormat { get; set; }Public Property NumberFormat As NumberFormatMembers
| Value | Description |
|---|---|
| ArabicNumbers | The list is numbered with Arabic numbers (1, 2, 3...). |
| Letters | The list is numbered with letters (a, b, c...). |
| CapitalLetters | The list is numbered with capital letters (A, B, C...). |
| RomanNumbers | The list is numbered with Roman numbers (I, II, III...). |
| SmallRomanNumbers | The list is numbered with small Roman numbers (i, ii, iii...). |
Examples
The following example applies NumberFormat while converting three selected paragraphs into a usable numbered list.
textControl.Text = "Research\nDraft\nReview";
textControl.Select(0, textControl.Text.Length);
ListFormat listFormat = new()
{
Type = ListType.Numbered,
NumberFormat = NumberFormat.Letters
};
textControl.Selection.ListFormat = listFormat;textControl.Text = "Research" & vbCrLf & "Draft" & vbCrLf & "Review"
textControl.Select(0, textControl.Text.Length)
Dim listFormat As New ListFormat() With {
.Type = ListType.Numbered,
.NumberFormat = NumberFormat.Letters
}
textControl.Selection.ListFormat = listFormatRemarks
The property's default value is NumberFormat.ArabicNumbers.
The property returns its default value when the text selection contains multiple paragraphs with mixed number formats or when the text selection does not contain a numbered list. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.