Rishad Hasan
Member
- Joined
- Feb 1, 2013
- Messages
- 8
- Programming Experience
- Beginner
Hello Everyone,
Thanks for helping me in last problem. I am here with new problem I am facing. Below is my code I wrote. My target is to control the display in 'ComboboxControlType' by heat input. But I am changing my input, everytime it always gave me the same control type. Whats wrong with my code, I couldn't find it. Would you mind help me.
Private
Sub TextBoxHeatInput_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBoxHeatInput.TextChanged
ComboBoxcControlType.Items.Clear()
Dim heatinput As Double
If ComboBoxModValveVendor.SelectedIndex <= 1 Then 'if asco or hw
'firing rate will control what control type is available (A, L, H, M)
If heatinput <= 2500 Then
ComboBoxcControlType.Items.Add(
"A - On/off")
ComboBoxcControlType.Items.Add(
"L - Low Fire Start")
ComboBoxcControlType.Items.Add(
"H - Low High Low")
ComboBoxcControlType.Items.Add(
"M - Modulation")
ComboBoxcControlType.SelectedIndex = 0
ElseIf heatinput <= 5000 Then
ComboBoxcControlType.Items.Add(
"L - Low Fire Start")
ComboBoxcControlType.Items.Add(
"H - Low High Low")
ComboBoxcControlType.Items.Add(
"M - Modulation")
ComboBoxcControlType.SelectedIndex = 0
Else
ComboBoxcControlType.Items.Add(
"M - Modulation")
ComboBoxcControlType.SelectedIndex = 0
End If
' siemens
'M only
End If
If ComboBoxModValveVendor.SelectedIndex > 1 Then
ComboBoxcControlType.Items.Add(
"M - Modulation")
ComboBoxcControlType.SelectedIndex = 0
End If
End Sub
End
Class
Thanks for helping me in last problem. I am here with new problem I am facing. Below is my code I wrote. My target is to control the display in 'ComboboxControlType' by heat input. But I am changing my input, everytime it always gave me the same control type. Whats wrong with my code, I couldn't find it. Would you mind help me.
Private
Sub TextBoxHeatInput_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBoxHeatInput.TextChanged
ComboBoxcControlType.Items.Clear()
Dim heatinput As Double
If ComboBoxModValveVendor.SelectedIndex <= 1 Then 'if asco or hw
'firing rate will control what control type is available (A, L, H, M)
If heatinput <= 2500 Then
ComboBoxcControlType.Items.Add(
"A - On/off")
ComboBoxcControlType.Items.Add(
"L - Low Fire Start")
ComboBoxcControlType.Items.Add(
"H - Low High Low")
ComboBoxcControlType.Items.Add(
"M - Modulation")
ComboBoxcControlType.SelectedIndex = 0
ElseIf heatinput <= 5000 Then
ComboBoxcControlType.Items.Add(
"L - Low Fire Start")
ComboBoxcControlType.Items.Add(
"H - Low High Low")
ComboBoxcControlType.Items.Add(
"M - Modulation")
ComboBoxcControlType.SelectedIndex = 0
Else
ComboBoxcControlType.Items.Add(
"M - Modulation")
ComboBoxcControlType.SelectedIndex = 0
End If
' siemens
'M only
End If
If ComboBoxModValveVendor.SelectedIndex > 1 Then
ComboBoxcControlType.Items.Add(
"M - Modulation")
ComboBoxcControlType.SelectedIndex = 0
End If
End Sub
End
Class