Quantcast
Viewing all articles
Browse latest Browse all 12583

Form Labels Moving Position At Runtime

I have a C# Windows Form with a bunch of label controls that have been positioned through the designer.  When the form has loaded, some of the labels have shifted position greatly ie. from point (102,364) to (117, 416).  There is not any difference in the properties of the labels that move and the ones that stay in the correct position.  Other than the location, size, and name the properties are all default.

The problem occurs in the Designer.cs file.  The label is created with the correct location property, but after the label is added to the form with the line

this.Controls.Add(this.label1);

the location has changed.  Locking the label has no effect.

Any idea about the cause/solution?  Any feedback is appreciated!

Thanks!


Viewing all articles
Browse latest Browse all 12583

Trending Articles