I'm using C# and windows forms, i have a group box with 20 labels in it (10 in the top row and 10 in the bottom row).

I want to set Text property of these labels based on their location coordinates in the group box. Y co-ordinate of all labels in same row remains same and only X co-ordinate changes.

```
Example locations:

label1.Location is (6,16), label2.Location is (33,16) ... label10.Location is (150,16)

label11.Location is (6,43), label12.Location is (33,43) ... label20.Location is (150,43)

```

Now originally the label.Text is set as `label_[int a]_[int b]` where `int a` is a number between 1 and 10 to show its "column" number and `int b` is a either 1 *OR* 2 for its "row" number.

Now this all works great but I need 60 group boxes each with 20 labels in it and renaming each one is quite a pain, that's why id like to do it this way. 

The reason its set out like this is because every "column" gets only 1 number in EITHER the top OR bottom row.

Now my 1st question is;
Is it possible to set the text property by its location property?

2ndly, can the stackoverflow hive mind think of a better/efficient way to do this?

NOTE:
i have tried loading the labels into a List to try use a loop but that creates complications with selecting the appropriate label.

i'm trying to develop a single method that can be used separately on each groupbox.

now while this all makes sense in my mind, i don't immediately see what other information i can provide.
['https://Stackoverflow.com/questions/39831170', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6691757/']
This sounds like a good candidate for a User Control to me.

Design a user control with the groupbox and labels.
Expose the operations you need externally. Possibly a good moment to set naming conventions to something more meaningful to you. 

Another way could be to generate the labels from code instead of design time like @Kevin says. Crate a method which takes you groupbox and other values you need. Then set label name and location as you want (look at the designer file).
I guess can try a foreach to GroupBox.Controls,and you can check their names inside this foreach too. example:

```
foreach(Label lbl in groupBox1.Controls
{
   if (lbl.Name.Contains("[int_a]_[int_b]"))
   {
      lbl.Text = "Label Text";
   }  
}

```

I guess this gives you a base to what you're needing