CharacterSpacing 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 a character spacing value, in twips, of the selected text. This value is added to each character. When it is negative, character spacing is reduced, otherwise it is extended.
Syntax
public int CharacterSpacing { get; set; }Public Property CharacterSpacing As IntegerExamples
The following example formats the heading of a short document by using Selection.CharacterSpacing.
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;
selection.CharacterSpacing = 720;
Console.WriteLine($"Character Spacing used by Selection: {selection.CharacterSpacing}");textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
textControl.Select(0, 17)
Dim selection As Selection = textControl.Selection
selection.CharacterSpacing = 720
Console.WriteLine($"Character Spacing used by Selection: {selection.CharacterSpacing}")Remarks
The property's default value is 0.
The property returns its default value when the text selection contains multiple characters with mixed character spacing settings. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.