L
Laurie
Hi,
It there any elegant way of linking a ComboBox with a NumericUpDown so
that the combobox.selectedindex is set by the NumericUpDown.value
without needing to use code like:
Private Sub NumericUpDownCode_ValueChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
NumericUpDownCode.ValueChanged
If Me.NumericUpDownCode.Value < Me.ComboBoxCode.Items.Count Then
Me.ComboBoxCode.SelectedIndex = Me.NumericUpDownCode.Value
End If
End Sub
If there any value in:
NumericUpDownCode.Maximum = Me.ComboBoxCode.Items.Count - 1
which could avoid the need for the If statement?
Regards,
Laurie
It there any elegant way of linking a ComboBox with a NumericUpDown so
that the combobox.selectedindex is set by the NumericUpDown.value
without needing to use code like:
Private Sub NumericUpDownCode_ValueChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
NumericUpDownCode.ValueChanged
If Me.NumericUpDownCode.Value < Me.ComboBoxCode.Items.Count Then
Me.ComboBoxCode.SelectedIndex = Me.NumericUpDownCode.Value
End If
End Sub
If there any value in:
NumericUpDownCode.Maximum = Me.ComboBoxCode.Items.Count - 1
which could avoid the need for the If statement?
Regards,
Laurie