怎样在richtextbox中选中整行文字,并使这行的背景色改变 [C#]public Color SelectionColor {get; set;} 设置这个属性。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这么简单的问题,我贴段代码,其中rtbReceive是一个RichTextBox控件int iPos=rtbReceive.TextLength;rtbReceive.AppendText(str1);rtbReceive.Select(iPos,rtbReceive.TextLength-iPos);rtbReceive.SelectionFont = new Font("宋体", 9, FontStyle.Bold | FontStyle.Underline);rtbReceive.SelectionColor = System.Drawing.Color.Red;iPos=rtbReceive.TextLength;rtbReceive.AppendText(str2);rtbReceive.Select(iPos,rtbReceive.TextLength-iPos);rtbReceive.SelectionFont = new Font("宋体", 12, FontStyle.Regular);rtbReceive.SelectionColor = System.Drawing.Color.Red;rtbReceive.SelectionIndent=20; 点击取消 退出正在运行的程序 在C#winform中如何关闭指定窗体? C# 屏蔽某个按键 C#操作SOAP头信息 为什么我一运行VS2005电脑就自动重启 请问在winform里面怎样使用用户控件? c#中是否可以对Excel的版本进行变换 求助,怎么做一个网页填表程序,把图片上传到网页 SQL 查询问题 NetMeeting中的“白板”如何做的? ------如何弹出确认对话框 C#中语句的意义?
int iPos=rtbReceive.TextLength;
rtbReceive.AppendText(str1);
rtbReceive.Select(iPos,rtbReceive.TextLength-iPos);
rtbReceive.SelectionFont = new Font("宋体", 9, FontStyle.Bold | FontStyle.Underline);
rtbReceive.SelectionColor = System.Drawing.Color.Red;iPos=rtbReceive.TextLength;
rtbReceive.AppendText(str2);
rtbReceive.Select(iPos,rtbReceive.TextLength-iPos);
rtbReceive.SelectionFont = new Font("宋体", 12, FontStyle.Regular);
rtbReceive.SelectionColor = System.Drawing.Color.Red;
rtbReceive.SelectionIndent=20;