从我昨天提出的这个How can i manage changed value text by highlighting the edited text only?问题来看,我正在尽最大努力使其发挥作用并且无效。
任何人都可以帮助我。今天早上我尝试了这个逻辑,看看我是否可以将它应用到网格中,但它不是
public void Mixedcolors()
{
RichTextBoxPrintNameColors.Font = new Font("Consolas", 18f, FontStyle.Bold);
RichTextBoxPrintNameColors.BackColor = Color.AliceBlue;
string[] _Colornames = { "Lion", "Monkey", "Kudu" };
Color[] colors = { Color.Red, Color.Red, Color.Yellow, };
for (int i = 0; i < _Colornames.Length; i++)
{
string _names = _Colornames[i];
Color color = colors[i];
{
RichTextBoxPrintNameColors.SelectionBackColor = color;
RichTextBoxPrintNameColors.AppendText(_names);
RichTextBoxPrintNameColors.SelectionBackColor = Color.AliceBlue;
RichTextBoxPrintNameColors.AppendText(" ");
}
}
}