# TextChangingEventArgs class

Namespace: [Eto.Forms](https://eto.picoe.ca/api/namespace/eto.forms.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
public class TextChangingEventArgs : CancelEventArgs
```

Arguments for events that handle when text is about to change, such as the [TextBox.TextChanging](https://eto.picoe.ca/api/type/eto.forms.textbox/textchanging.md) event.

**Remarks:** To cancel the change, set the inherited [CancelEventArgs.Cancel](https://learn.microsoft.com/dotnet/api/system.componentmodel.canceleventargs.cancel) property to true.

## Constructors

- [TextChangingEventArgs](https://eto.picoe.ca/api/type/eto.forms.textchangingeventargs/ctor.md): (6 overloads) Initializes a new instance of the [TextChangingEventArgs](https://eto.picoe.ca/api/type/eto.forms.textchangingeventargs.md) class.

## Properties

- [FromUser](https://eto.picoe.ca/api/type/eto.forms.textchangingeventargs/fromuser.md): Gets a value indicating that the change was initiated by the user, false when the change was made programmatically.
- [NewText](https://eto.picoe.ca/api/type/eto.forms.textchangingeventargs/newtext.md): Gets the new text the control will contain after the change.
- [OldText](https://eto.picoe.ca/api/type/eto.forms.textchangingeventargs/oldtext.md): Gets the entire old text for the control.
- [Range](https://eto.picoe.ca/api/type/eto.forms.textchangingeventargs/range.md): Gets the range that the text will be replaced or deleted.
- [Source](https://eto.picoe.ca/api/type/eto.forms.textchangingeventargs/source.md): Gets a value indicating how the change was initiated, e.g. by typing, pasting, or programmatically.
- [Text](https://eto.picoe.ca/api/type/eto.forms.textchangingeventargs/text.md): Gets the text that is to be inserted at the given [TextChangingEventArgs.Range](https://eto.picoe.ca/api/type/eto.forms.textchangingeventargs/range.md), or string.Empty if text will be deleted.
