本文介绍了如何使文本框只读(仅当单击特定的单选按钮时)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个单选按钮,例如:radiobutton1 =推荐
radiobutton1 =与上述相同
当我点击上面相同的单选按钮文本框应该是只读的,不应该进行验证但是点击recomend通过单选按钮文本框验证应该完成
怎么办?
i am having two radio buttons eg;radiobutton1=recommend by
radiobutton1=same as above
when i click same as above radio button text boxes should be made read only and no validations should be done but on clicking recomend by radio button textbox validation should be done
how to do?
推荐答案
' auto switch the readable state according to check state of radiobutton2
TextBox1.ReadOnly = RadioButton2.Checked
If RadioButton1.Checked = True Then
' put your validation code here
MsgBox("Run validation code")
End If
这篇关于如何使文本框只读(仅当单击特定的单选按钮时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!