# RulerBar.ReadOnly Property

> Gets or sets a value determining the ruler bar's read only mode. When the ruler 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 > RulerBar.ReadOnly Property
- **315 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/rulerbar/readonly-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/rulerbar/readonly-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/rulerbar/readonly-property/llms-full.txt

---

### Description

Gets or sets a value determining the ruler bar's read only mode. When the ruler 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 `RulerBar.ReadOnly` to prevent users from editing through the ruler bar. The change is then applied to the active document or user interface.

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

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

---

## Nearby

- **Previous:** [RulerBar.FormulaMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/rulerbar/formulamode-property/llms-full.txt)
- **Next:** [RulerBar.ResetDisplayColors Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/rulerbar/resetdisplaycolors-method/llms-full.txt)
