Hi
I have something that looks like this
H1 H2
CHK1 N1 D1
CHK2 N2 D2
CHK3 N3 D3
CHKN NN DN
1 2
3 4 5
6 7 8
9 10 11
// control positions if you had a counter counting with the foreach loop.
So H1 & H2 are just some labels, Chk is checkboxes and N & D are labels. I generate this table sort of looking thing dynamically.
Now I want to resize some of the labels dynamically. I want to find all the N1,N2,N3,NN labels and resize them.
So I am not sure how to do this.
First I found all controls
foreach (Control c in panel.Controls)
{
if (c.GetType() == typeof(Label))
{
}
}
Now I am not sure how to grab those N ones. Like N1 is Control 4, N2 is control 7 and N3 is control 10.
So at first I tried to just get all the even controls but I quickly realized that the N1 controls go even then odd.
So that will not work. So I am not sure how to write something to get these controls I want.