Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

Vb 2010:

$
0
0
I want each box to contain different values when a user select a different cell in a listview and clicks on the button.
for instance: If I check Checkbox1, a listview is opened. Then I select cell 'a'=ABC in the listview, the value is put in label5. And when I click on button1, the value ABC is placed in the txtLeak.
Now I select checkbox2, and I select cell 'D' = KEF, the value is put in label 5. And when I click on button1, the valued KEF is placed in txtSidescatter
But this code displays the same value in each checkbox:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Form1.CheckBox1.Checked = True Then
Form1.txtLeak.Text = Label5.Text
End If
If Form1.CheckBox2.Checked = True Then
Form1.txtSidescatter.Text = Label5.Text
End If
If Form1.CheckBox3.Checked = True Then
Form1.txtLeakageSideScatter.Text = Label5.Text
End If
If Form1.CheckBox4.Checked = True Then
Form1.txtForwardBackscatter.Text = Label5.Text
End If
If Form1.CheckBox5.Checked = True Then
Form1.txtLeakageForward.Text = Label5.Text
End If
Close()

End Sub
Attached Images
 

Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>