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?
Hold down Shift , click the objects that you want to align, and then click the Shape Format tab. Click Arrange > Align, and select an alignment option. If you displayed the gridlines, you will see that the objects are aligned on the grid.
You can change the TextAlign propety using HorizontalAlignment enumerator. Try something like:
textBox1.TextAlign = HorizontalAlignment.Right;
Use the Textalign Property. It uses the Horizontal Alignment Enumeration which wil give you Left, Right or Center Alignment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With