CharacterScaling Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets a character scaling, in percent of the average character width, of the selected text.
Syntax
public int CharacterScaling { get; set; }Public Property CharacterScaling As IntegerExamples
The following example formats the heading of a short document by using Selection.CharacterScaling.
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;
selection.CharacterScaling = 10;
Console.WriteLine($"Character Scaling used by Selection: {selection.CharacterScaling}");textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
textControl.Select(0, 17)
Dim selection As Selection = textControl.Selection
selection.CharacterScaling = 10
Console.WriteLine($"Character Scaling used by Selection: {selection.CharacterScaling}")Remarks
The property's default value is 100.
The property returns its default value when the text selection contains multiple characters with mixed character scaling settings. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.