主题:[讨论]有方法把list1的数值加在一起并在text1中显示吗?
以下是 code的动作
1.Combo1有几个选项(10,20),当用click去选完之后,
2.再按Commond1 一下,
3.List1 就会显示 +10 。
4.再按Commond2 一下,
5.List1 就会显示 -10 。
6.按Commond3 会将List1 clear。
------------------------
Private Sub Combo1_Change()
InfoDisplay1
End Sub
Private Sub Combo2_Change()
InfoDisplay3
End Sub
Private Sub Command1_Click()
InfoDisplay1
End Sub
Private Sub Command2_Click()
InfoDisplay2
End Sub
Private Sub Command3_Click()
InfoDisplay3
End Sub
Private Sub Command4_Click()
InfoDisplay4
End Sub
Private Sub Form_Load()
Combo1.AddItem "10"
Combo1.AddItem "20"
Combo2.AddItem "10"
Combo2.AddItem "20"
End Sub
Private Sub InfoDisplay1()
If Combo1.Text = "10" Then
List1.AddItem "+10"
Else
If Combo1.Text = "20" Then
List1.AddItem "+20"
End If
End Sub
Private Sub InfoDisplay2()
If Combo1.Text = "10" Then
List1.AddItem "-10"
Else
If Combo1.Text = "20" Then
List1.AddItem "-20"
End If
End Sub
Private Sub InfoDisplay3()
If Combo2.Text = "10" Then
List2.AddItem "+10"
Else
If Combo2.Text = "20" Then
List2.AddItem "+20"
End If
End Sub
Private Sub InfoDisplay4()
If Combo2.Text = "10" Then
List2.AddItem "-10"
Else
If Combo2.Text = "20" Then
List2.AddItem "-20"
End If
End Sub
----------------------------------------
现在想做的是把list1的数值加在一起并在text1中显示出来
请问大家可以指教一下我吗?
谢谢
1.Combo1有几个选项(10,20),当用click去选完之后,
2.再按Commond1 一下,
3.List1 就会显示 +10 。
4.再按Commond2 一下,
5.List1 就会显示 -10 。
6.按Commond3 会将List1 clear。
------------------------
Private Sub Combo1_Change()
InfoDisplay1
End Sub
Private Sub Combo2_Change()
InfoDisplay3
End Sub
Private Sub Command1_Click()
InfoDisplay1
End Sub
Private Sub Command2_Click()
InfoDisplay2
End Sub
Private Sub Command3_Click()
InfoDisplay3
End Sub
Private Sub Command4_Click()
InfoDisplay4
End Sub
Private Sub Form_Load()
Combo1.AddItem "10"
Combo1.AddItem "20"
Combo2.AddItem "10"
Combo2.AddItem "20"
End Sub
Private Sub InfoDisplay1()
If Combo1.Text = "10" Then
List1.AddItem "+10"
Else
If Combo1.Text = "20" Then
List1.AddItem "+20"
End If
End Sub
Private Sub InfoDisplay2()
If Combo1.Text = "10" Then
List1.AddItem "-10"
Else
If Combo1.Text = "20" Then
List1.AddItem "-20"
End If
End Sub
Private Sub InfoDisplay3()
If Combo2.Text = "10" Then
List2.AddItem "+10"
Else
If Combo2.Text = "20" Then
List2.AddItem "+20"
End If
End Sub
Private Sub InfoDisplay4()
If Combo2.Text = "10" Then
List2.AddItem "-10"
Else
If Combo2.Text = "20" Then
List2.AddItem "-20"
End If
End Sub
----------------------------------------
现在想做的是把list1的数值加在一起并在text1中显示出来
请问大家可以指教一下我吗?
谢谢