• <bdo id='IyT6N'></bdo><ul id='IyT6N'></ul>

      <small id='IyT6N'></small><noframes id='IyT6N'>

      <tfoot id='IyT6N'></tfoot>
      <i id='IyT6N'><tr id='IyT6N'><dt id='IyT6N'><q id='IyT6N'><span id='IyT6N'><b id='IyT6N'><form id='IyT6N'><ins id='IyT6N'></ins><ul id='IyT6N'></ul><sub id='IyT6N'></sub></form><legend id='IyT6N'></legend><bdo id='IyT6N'><pre id='IyT6N'><center id='IyT6N'></center></pre></bdo></b><th id='IyT6N'></th></span></q></dt></tr></i><div id='IyT6N'><tfoot id='IyT6N'></tfoot><dl id='IyT6N'><fieldset id='IyT6N'></fieldset></dl></div>

      <legend id='IyT6N'><style id='IyT6N'><dir id='IyT6N'><q id='IyT6N'></q></dir></style></legend>

      具有相同宽度字符的 C# .NET 多行文本框

      时间:2023-06-10
        <tbody id='cppG0'></tbody>

        <legend id='cppG0'><style id='cppG0'><dir id='cppG0'><q id='cppG0'></q></dir></style></legend>
        • <bdo id='cppG0'></bdo><ul id='cppG0'></ul>
          <tfoot id='cppG0'></tfoot>

            <small id='cppG0'></small><noframes id='cppG0'>

            • <i id='cppG0'><tr id='cppG0'><dt id='cppG0'><q id='cppG0'><span id='cppG0'><b id='cppG0'><form id='cppG0'><ins id='cppG0'></ins><ul id='cppG0'></ul><sub id='cppG0'></sub></form><legend id='cppG0'></legend><bdo id='cppG0'><pre id='cppG0'><center id='cppG0'></center></pre></bdo></b><th id='cppG0'></th></span></q></dt></tr></i><div id='cppG0'><tfoot id='cppG0'></tfoot><dl id='cppG0'><fieldset id='cppG0'></fieldset></dl></div>
              1. 本文介绍了具有相同宽度字符的 C# .NET 多行文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                如果您输入多行 TextBox,我该怎么做:

                How can I make it so if you typed in a multiline TextBox:

                abcde
                
                ABCDE
                

                这样大的E直接在小e的下方.如果它们在同一行,我希望它们垂直排列.

                So that the big E is directly below the little e. I want them to line up vertically if they are in the same row.

                推荐答案

                你能把文本框上的字体设置为 等宽一个?

                Can you just set the font on the textbox to a monospaced one?

                在代码中,保持与默认字体相同的大小:

                In code, keeping the same size as the default font:

                textBox.Font = new Font(FontFamily.GenericMonospace, textBox.Font.Size);
                

                或者只是更改设计器中的 Font 属性.

                Or just change the Font property in the designer.

                这篇关于具有相同宽度字符的 C# .NET 多行文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:在不触发 TextChanged 事件的情况下更改文本框文本 下一篇:System.Windows.Forms.TextBox 中未显示 Unicode 字符

                相关文章

                <legend id='8ZlNc'><style id='8ZlNc'><dir id='8ZlNc'><q id='8ZlNc'></q></dir></style></legend>
                  <bdo id='8ZlNc'></bdo><ul id='8ZlNc'></ul>

                  1. <small id='8ZlNc'></small><noframes id='8ZlNc'>

                  2. <i id='8ZlNc'><tr id='8ZlNc'><dt id='8ZlNc'><q id='8ZlNc'><span id='8ZlNc'><b id='8ZlNc'><form id='8ZlNc'><ins id='8ZlNc'></ins><ul id='8ZlNc'></ul><sub id='8ZlNc'></sub></form><legend id='8ZlNc'></legend><bdo id='8ZlNc'><pre id='8ZlNc'><center id='8ZlNc'></center></pre></bdo></b><th id='8ZlNc'></th></span></q></dt></tr></i><div id='8ZlNc'><tfoot id='8ZlNc'></tfoot><dl id='8ZlNc'><fieldset id='8ZlNc'></fieldset></dl></div>

                    <tfoot id='8ZlNc'></tfoot>