stretch label horizontally on a panel in c#

Asked

Viewed 94 times

0

  • 6

    Welcome to SOPT. See here how to create a minimum, complete and verifiable example. Put your code in the question instead of putting a link for the code, makes it easier to help it. It is also worth mentioning if it is to use Winforms or WPF (it would be simple to infer if you had placed the code).

1 answer

2

Assuming you want to change by the way Design of Visual Studio, you can settar the property Autosize of Label for False and change property Dock for Top, but this will cause the Label stay "glued" also on the top edge of the panel.

An alternative is to just change the property Autosize for False and "stretch" the label until it gets the size you need.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.