Capitals 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 values specifying wheather the lowercase letters of the selected text are displayed with capital letters. Lowercase letters are displayed either with capital letters of the same size or with capital letters which have a smaller size. The smaller size is either the size of the lowercase 'x' (petite caps) or the size of the lowercase 'x' + 10% (small caps).
Syntax
public Capitals Capitals { get; set; }Public Property Capitals As CapitalsMembers
| Value | Description |
|---|---|
| None | There are no text effects with capital letters. |
| Capitals | All lowercase letters are displayed with capital letters. |
| PetiteCapitals | All lowercase letters are displayed with capital letters which have the size of the lowercase 'x'. |
| SmallCapitals | All lowercase letters are displayed with capital letters which have the size of the lowercase 'x' + 10%. |
Examples
The following example formats the heading of a short document by using Selection.Capitals.
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;
selection.Capitals = Capitals.Capitals;
Console.WriteLine($"Capitals used by Selection: {selection.Capitals}");textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
textControl.Select(0, 17)
Dim selection As Selection = textControl.Selection
selection.Capitals = Capitals.Capitals
Console.WriteLine($"Capitals used by Selection: {selection.Capitals}")Remarks
The property's default value is Capitals.None.
The property returns its default value when the text selection contains multiple characters with mixed settings. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.