Reputation: 2316
I would expect there would be a property that I need to set to align the text inside a TextBox, but I can't find it. I remember using [style="text-align:right"] in ASP.net, but what do I use in WinForms?
Upvotes: 6
Views: 26822
Reputation: 38638
You can change the TextAlign propety using HorizontalAlignment enumerator. Try something like:
textBox1.TextAlign = HorizontalAlignment.Right;
Upvotes: 10
Reputation: 1506
Probably the TextAlign property:
http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.textalign
Upvotes: 2
Reputation: 54562
Use the Textalign Property. It uses the Horizontal Alignment Enumeration which wil give you Left, Right or Center Alignment.
Upvotes: 3