Reputation: 16724
I'm setting an text in the label that is variable, so I need set dynamically the position it.
For example:
text: baa
in form:
------------------
| baa|
| |
| |
-----------------
text: baaaaaaaa
in form:
------------------
| baaaaaaaa|
| |
| |
-----------------
ever in corner. how I do this? Thanks stackoverflow!
Upvotes: 1
Views: 446
Reputation: 411
Set `Auto Size` property of label to `False` and `TextAlign` Property
to `MiddleRight`
Upvotes: 0
Reputation: 564333
You can set it's Dock property to Top and Right.
label.Dock = DockStyle.Top | DockStyle.Right;
Upvotes: 2