鼠标在combobox的下拉表项目上移动,读取该项的值,并触发一个事件,如何实现?
鼠标在combobox的下拉表项目上移动,读取该项的值,并触发一个事件,如何实现?请各位指点! --------------------编程问答-------------------- 我不想用SelectedIndexChanged --------------------编程问答-------------------- 不想用SelectedIndexChanged 就用ComboBox1_TextChanged --------------------编程问答-------------------- 建议你用弹出菜单,因为菜单有鼠标悬停事件(MouseHover)。 --------------------编程问答-------------------- 用ComboBox1_SelectedValueChanged也行,呵呵
Private Sub ComboBox1_SelectedValueChanged(sender As Object, e As System.EventArgs) Handles ComboBox1.SelectedValueChanged
TextBox1.Text = ComboBox1.SelectedItem.ToString()
MessageBox.Show(TextBox1.Text)
End Sub
=========
Private Sub ComboBox1_TextChanged(sender As Object, e As System.EventArgs) Handles ComboBox1.TextChanged
TextBox1.Text = ComboBox1.SelectedItem.ToString()
MessageBox.Show(TextBox1.Text)
End Sub
补充:.NET技术 , VB.NET