Uplně jednoduše pomocí klasického rozeskoku Select Case...
Public Class Form1
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Select Case ComboBox1.SelectedIndex
Case 1
TextBox1.ReadOnly = True
TextBox2.ReadOnly = False
TextBox3.ReadOnly = False
Case 2
TextBox1.ReadOnly = False
TextBox2.ReadOnly = True
TextBox3.ReadOnly = False
Case 3
TextBox1.ReadOnly = False
TextBox2.ReadOnly = False
TextBox3.ReadOnly = True
End Select
End Sub
End Class
|