如何在多行的TextBox中每一行显示不同的颜色? 我在richtextbox中只找到selectioncolor的属性怎么能设置当前插入点的color属性? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 使用richtextboxprivate void button1_Click(object sender, System.EventArgs e) { string[] tempArray = new string [richTextBox1.Lines.Length]; tempArray = richTextBox1.Lines; for(int counter=0; counter < tempArray.Length;counter++) { System.Diagnostics.Debug.WriteLine(tempArray[counter]); richTextBox1.SelectedText = tempArray[counter]; if(counter%2==0) richTextBox1.SelectionColor = Color.Red; else richTextBox1.SelectionColor = Color.Green ; } } PostMessage 无效问题 求一个思路 PrintDocument 問題 cs文件代码注释都是用繁体,但是在简体操作系统里cs有些正常,有些变成了乱码,请问如何解决? 求救!RSA加密解密问题 求:C#网络通信的例子(C/S结构) xml是如何穿透防火墙的? 2005怎么装?是不是C1到CD2再到CD1呢?NND,我装了半天了,还没有装完。我OS是2003的 C#做的一个小工具,安装后重启电脑打开第一次会报错,第二次都加载正常了不会报错 用C#解析接收到的WITS协议数据,传输方式是UDP 水晶报表在98下部署问题,有高分送,急 C#中Textbox如何实现自动滚屏?
private void button1_Click(object sender, System.EventArgs e)
{
string[] tempArray = new string [richTextBox1.Lines.Length];
tempArray = richTextBox1.Lines; for(int counter=0; counter < tempArray.Length;counter++)
{
System.Diagnostics.Debug.WriteLine(tempArray[counter]);
richTextBox1.SelectedText = tempArray[counter];
if(counter%2==0)
richTextBox1.SelectionColor = Color.Red;
else
richTextBox1.SelectionColor = Color.Green ;
}
}