vendredi 9 octobre 2015

Check box and label connection

I am generating a various number of ceckboxes 1-x and labels 1-x:

WithEvents lb_cislozakazky As Windows.Forms.Label
WithEvents check_m As Windows.Forms.CheckBox

For i = 1 To x
        check_m = New Windows.Forms.CheckBox
        check_m.Name = "check_manual" & i
        check_m.Top = i * 20 - 19
        check_m.Left = 35
        check_m.Width = 20
        check_m.Height = 20
        Panel2.Controls.Add(check_m)   
 next

Now I would like to connect one check box with one label. For exemple: when you check chckbox1 > label1 will change color to red. Thanks for any advise




Aucun commentaire:

Enregistrer un commentaire