'I can iterate through controls on my form and set the .text and .enable property (see below). However, when I try to set the .READONLY property I get an error. How can this be done.
'Code
Dim i As Integer
For i = 0 To Me.Controls.Count - 1
If Me.Controls(i).GetType() Is GetType(System.Windows.Forms.TextBox) Then
Me.Controls(i).Text = ""
Me.Controls(i).Enabled = True
Me.Controls(i).ForeColor = color.blue
Me.Controls(i).BackColor = color.yellow
' ...I want to set the READONLY property like
Me.Controls(i).READONLY = False
'but this doesn't work
End If
Any Help appreciated.
Cheers
Kieran
'Code
Dim i As Integer
For i = 0 To Me.Controls.Count - 1
If Me.Controls(i).GetType() Is GetType(System.Windows.Forms.TextBox) Then
Me.Controls(i).Text = ""
Me.Controls(i).Enabled = True
Me.Controls(i).ForeColor = color.blue
Me.Controls(i).BackColor = color.yellow
' ...I want to set the READONLY property like
Me.Controls(i).READONLY = False
'but this doesn't work
End If
Any Help appreciated.
Cheers
Kieran