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

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

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

          <bdo id='ZWu99'></bdo><ul id='ZWu99'></ul>
      1. 多色文本框 C#

        Multi-color TextBox C#(多色文本框 C#)

          <tbody id='dm3GC'></tbody>

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

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

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

                  问题描述

                  我想在文本框中以 2 种颜色显示文本,例如 1 行红 2 蓝,如果我使用 name.ForeColor = Color.Red; 所有文本都会改变颜色,但我希望它会改变只有 1 种线条颜色.

                  I want show text in textbox in 2 colors, for example 1 line red 2 blue, if I use name.ForeColor = Color.Red; all text change color, but I want that will change only 1 line color.

                  推荐答案

                  你需要使用 富文本框.

                  然后您可以通过选择文本并更改选择颜色或字体来更改文本颜色.

                  You can then change the textcolor by selecting text and changing the selection color or font.

                  richTextBox1.SelectionFont = new Font("Verdana", 12, FontStyle.Bold);
                  richTextBox1.SelectionColor = Color.Red;
                  

                  这篇关于多色文本框 C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to keep the Text of a Read only TextBox after PostBack()?(PostBack()之后如何保留只读文本框的文本?)
                  Winforms Textbox - Using Ctrl-Backspace to Delete Whole Word(Winforms 文本框 - 使用 Ctrl-Backspace 删除整个单词)
                  C# - Add button click events using code(C# - 使用代码添加按钮单击事件)
                  How can i set the caret position to a specific index in passwordbox in WPF(如何将插入符号位置设置为 WPF 密码框中的特定索引)
                  C# Numeric Only TextBox Control(C# 纯数字文本框控件)
                  Unicode characters not showing in System.Windows.Forms.TextBox(System.Windows.Forms.TextBox 中未显示 Unicode 字符)

                      <tbody id='NSvp5'></tbody>
                    • <bdo id='NSvp5'></bdo><ul id='NSvp5'></ul>

                      • <tfoot id='NSvp5'></tfoot>

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

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

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