问一个弱弱的问题
WinForm里边有个Label的内容是"ABC",我现在想让B显示红色。怎么处理?貌似在B/S简单的一个颜色设置,Form里不晓得怎么整。。。
程序代码:using System.Windows.Forms;
using System.Drawing;
class Test
{
static void Main()
{
RichTextBox label = new RichTextBox
{
ReadOnly = true,
BorderStyle = BorderStyle.None,
Text = "ABC"
};
label.Select(1, 1);
label.SelectionColor = Color.Red;
label.Select(0, 0);
Form form = new Form();
form.Controls.Add(label);
Application.Run(form);
}
}