Gets or sets a value indicating whether text in the text box is read-only.
[Visual Basic] Public Property ReadOnly As Boolean [C#] public bool ReadOnly {get; set;} [C++] public: __property bool get_ReadOnly(); public: __property void set_ReadOnly(bool); [JScript] public function get ReadOnly() : Boolean; public function set ReadOnly(Boolean);
true if the text box is read-only; otherwise, false. The default is false.
When this property is set to true, the contents of the control cannot be changed. You can use this feature instead of disabling the control with the Enabled property to allow the contents to be copied.
TextBoxBase Class | TextBoxBase Members | System.WinForms Namespace