Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

TableLayoutPanel with Labels in all of the cells

$
0
0

I have a TableLayoutPanel with 3x3 cells. Each cell has a label in it. I have a click handler common to them all so I delare:

Label clickLabel = sender as Label;

In the properties window of the designer these labels have a "cell" property which gives the TableLayoutPanel's cell for each particular label. However, when I'm coding the click handler VS won't allow me to use:

clickLabel.Cell.Row
clickLabel.Cell.Col
My question is: how can I find the TableLayoutPanel coordinates of the clicked label?

Viewing all articles
Browse latest Browse all 12583

Trending Articles



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