I'm trying to make a calculator where the result of the calculation should display on the right side instead of the left.
Unfortunately, you can't use tbx_main.TextAlign = HorizontalAlignment.Right;
since it makes the whole text align on the right. It would really be useful if there was a way like \\t
where that row only gets dragged to the right. I'm unsure if there even is a solution to this...
you can use TextBox.TextAlign Property if you are are using Windows Forms
for WPF TextBox.TextAlignment Property for WPF https://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.textbox.textalignment?view=netframework-4.8
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.