​
​
​

Gets or sets a value specifying whether the document is read only. Neither the document's text can be changed nor the document can be formatted. The default setting of this property is true.

Syntax

​public bool ReadOnly { get; set; }
​Public Property ReadOnly() As Boolean

Examples

The following snippet describes how to use the TXTextControl.DocumentPermissions.AllowFormatting property. Here, it is set to true, which is also the default value.

​textControl1.EditMode = TXTextControl.EditMode.ReadAndSelect;
TXTextControl.DocumentPermissions documentPermissions = new TXTextControl.DocumentPermissions();
documentPermissions.AllowCopy = false; 
documentPermissions.AllowFormatting = false; 
documentPermissions.AllowFormattingStyles = false; 
documentPermissions.AllowPrinting = false; 
documentPermissions.ReadOnly = true; // Here, the ReadOnly property is set
​TextControl1.EditMode = TXTextControl.EditMode.ReadAndSelect
Dim documentPermissions As TXTextControl.DocumentPermissions = New TXTextControl.DocumentPermissions()
documentPermissions.AllowCopy = False
documentPermissions.AllowFormatting = False
documentPermissions.AllowFormattingStyles = False
documentPermissions.AllowPrinting = False
documentPermissions.[ReadOnly] = True ' Here, the ReadOnly property is set
​