dpatfield66
Well-known member
- Joined
- Apr 6, 2006
- Messages
- 136
- Programming Experience
- 5-10
I have an event handler that's working right now, but I'd like to make it cleaner, if at all possible.
Currently it reads like this:
Private Sub ComboBox_GotFocus(ByVal sender as object,ByVal e as System.EventArgs) Handles cboBox1.GotFocus, cboBox2.GotFocus (etc...)
sender.DroppedDown = True
End Sub
I've got about 50 combo boxes that are being handled, making this a large chunk of code.
==================================================
Is there ANY way to do something like this:
Private Sub ComboBox_GotFocus((ByVal sender as object,ByVal e as System.EventArgs) Handles (??) (All?)
If TypeOf sender is ComboBox Then
sender.DroppedDown = True
End If
=================================================
I wish there already was a property for each combobox where it dropped down it's values when entered into or focus was gotten. Get on the Ball Microsoft!!!
Currently it reads like this:
Private Sub ComboBox_GotFocus(ByVal sender as object,ByVal e as System.EventArgs) Handles cboBox1.GotFocus, cboBox2.GotFocus (etc...)
sender.DroppedDown = True
End Sub
I've got about 50 combo boxes that are being handled, making this a large chunk of code.
==================================================
Is there ANY way to do something like this:
Private Sub ComboBox_GotFocus((ByVal sender as object,ByVal e as System.EventArgs) Handles (??) (All?)
If TypeOf sender is ComboBox Then
sender.DroppedDown = True
End If
=================================================
I wish there already was a property for each combobox where it dropped down it's values when entered into or focus was gotten. Get on the Ball Microsoft!!!