# TextControl.EditMode Property

> Gets or sets a value indicating whether the document's text is protected, or can be freely edited and formatted.

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

---

### Description

Gets or sets a value indicating whether the document's text is protected, or can be freely edited and formatted.

### Syntax

```csharp
public EditMode EditMode { get; set; }
```

```vbnet
Public Property EditMode As EditMode
```

### Members

| Value | Description |
|---|---|
| Edit | The document's text can be edited and formatted without restrictions. |
| ReadAndSelect | The document's text is displayed and text can be selected. Editing and formatting is restricted as specified through the [DocumentPermissions](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/documentpermissions-property/llms-full.txt) property. |
| ReadOnly | The document's text is only displayed, text cannot be selected. |
| UsePassword | A dialog box to enter a password is opened to protect the edit mode. This value can only be combined with EditMode.ReadAndSelect using the bitwise or operator. |

### Examples

The following example uses `TextControl.EditMode` to configure edit mode as part of the text control workflow. The change is then applied to the active document or user interface.

```csharp
textControl.EditMode = EditMode.Edit;
textControl.Update();
```

```vbnet
textControl.EditMode = EditMode.Edit
textControl.Update()
```

---

## Nearby

- **Previous:** [TextControl.EditableRegions Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/editableregions-property/llms-full.txt)
- **Next:** [TextControl.EndUndoAction Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/endundoaction-method/llms-full.txt)
