当我们从组合框中选择值时启用组框 [英] enable a groupbox when we select value from combobox
本文介绍了当我们从组合框中选择值时启用组框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
启用组框
推荐答案
每当从组合框中选择一个值时,将触发以下`SelectedIndexChanged`事件。所以,你应该尝试这样的事情:
Whenever a value is selected from a combo box the following `SelectedIndexChanged` event triggers. So, you should try something like this:
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
' TODO : Here you can also set index based criteria
' If (comboBox1.SelectedIndex = 2) Then
' groupBox1.Enabled = True
' End If
groupBox1.Enabled = True
End Sub
访问ComboBox控件的MSDN文档。
希望它有所帮助!
Visit MSDN documentation for `ComboBox` control as well.
Hope it helps!
这篇关于当我们从组合框中选择值时启用组框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文