Search code examples
c#visual-studiowinformstextboxlabel

WinForms: Is there a concept of associating a label with a textbox?


I'm using Visual Studio 2010 with C#. Is there a concept in Windows Forms development of somehow linking a label with is text box? Something so that they move together as a unit? In the ASP.NET world, there is the AssociatedControlId property of the label control. I also think I remember MS Access form designer having some way of associating (or linking) labels with controls. Does this feature even exist in Visual Studio world?

If not, how do you group labels with controls such that if you move a text box you don't have to manually move the label also?


Solution

  • No there is not - at least with the out of the box controls. If you want this you could achieve it with a user control.

    In general the winforms is not line driven in the same way as HTML is.