Can I use Checkboxs for OnPaint function like this?

How can I manipulate the lines casted from OnPaint function, like I would want the location of check box 1 and connect it to box 2 and so on. I would also like the line to be invisible until the next box in line is checked. I appreciate all the help!

I have been able to get the positions and cast the lines to the checkboxes but I am curious on how I can make it only visable if two are connected