Simpler Way to Draw Lines on TableLayoutPanel of Labels?

368 views Asked by At

My picture shows a TableLayoutPanel filled with labels. I want to draw a box around one of the rows in the table as shown in this picture:

TableLayoutPanel with lines

It took 5 event handlers to achieve this! I am drawing lines in each of the 4 Paint event handlers for the labels, and then I draw lines in the TableLayoutPanel Paint event handler to connect the lines drawn by the labels Paint events.

Does it really need to be this complicated? If I try to draw everything in the TableLayoutPanel Paint event handler only, it looks like this: enter image description here

0

There are 0 answers