简体   繁体   English

c# - 如何在文本框中对齐一行

[英]How to align one line in a textbox c#

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;不幸的是,您不能使用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.如果有一种像\\t这样的方法,该行只会被拖到右边,那真的很有用。 I'm unsure if there even is a solution to this...我不确定是否有解决方案...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM