# ButtonBar.ReadOnly Property

> Gets or sets a value determining the button bar's read only mode. When the button bar is set to read only, it still shows all formatting attributes of the connected TextControl, but formatting attributes cannot be changed.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 24.0
- **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 > ButtonBar.ReadOnly Property
- **316 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/buttonbar/readonly-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/buttonbar/readonly-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/buttonbar/readonly-property/llms-full.txt

---

### Description

Gets or sets a value determining the button bar's read only mode. When the button bar is set to read only, it still shows all formatting attributes of the connected [TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/llms-full.txt), but formatting attributes cannot be changed.

### Syntax

```csharp
public bool ReadOnly { get; set; }
```

```vbnet
Public Property [ReadOnly] As Boolean
```

### Examples

The following example uses `ButtonBar.ReadOnly` to prevent users from editing through the button bar. The change is then applied to the active document or user interface.

```csharp
buttonBar.ReadOnly = true;
buttonBar.Update();
```

```vbnet
buttonBar.ReadOnly = True
buttonBar.Update()
```

---

## Nearby

- **Previous:** [ButtonBar.DisplayColors Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/buttonbar/displaycolors-property/llms-full.txt)
- **Next:** [ButtonBar.ResetButtonOffsets Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/buttonbar/resetbuttonoffsets-method/llms-full.txt)
