# Selection.CharacterScaling Property

> Gets or sets a character scaling, in percent of the average character width, of the selected text.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 30.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > Selection.CharacterScaling Property
- **546 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/characterscaling-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/characterscaling-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/characterscaling-property/llms-full.txt

---

### Description

Gets or sets a character scaling, in percent of the average character width, of the selected text.

### Syntax

```csharp
public int CharacterScaling { get; set; }
```

```vbnet
Public Property CharacterScaling As Integer
```

### Examples

The following example formats the heading of a short document by using `Selection.CharacterScaling`.

```csharp
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}");
```

```vbnet
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](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/iscommonvalueselected-method/llms-full.txt) method can be used to check for mixed attributes.

---

## Nearby

- **Previous:** [Selection.ChangeDirection Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/changedirection-method/llms-full.txt)
- **Next:** [Selection.CharacterSpacing Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/characterspacing-property/llms-full.txt)
