richtextbox 中怎么插入字符串 using System.Windows.Formsrichtextbox 中怎么插入字符串, 我用richtextbox.text.insert怎么不行啊..不能用appendtext,那个太麻烦 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://community.csdn.net/Expert/topic/4351/4351576.xml?temp=.3618128 用他的Lines属性这样赋值,怎么结果不变呢?源玛如下:private void EnterKeyEvent(System.Windows.Forms.KeyEventArgs e){ string strContent = ""; string strSelected = ""; int iLineIndex = 0; strContent = GetCurLineString(out iLineIndex); if(listBox1.Items.Count !=0 || listBox1.Visible == false) { strSelected = this.listBox1.Items[0].ToString(); try { if(strContent.IndexOf("(") != -1) { this.richTextBox1.Lines[iLineIndex] = ""; this.richTextBox1.Lines[iLineIndex] = strContent + strSelected; //this.richTextBox1.Text.Insert(0, strContent + strSelected); } else { this.richTextBox1.Lines[iLineIndex] = ""; this.richTextBox1.Lines[iLineIndex] = strSelected; //this.richTextBox1.Text.Insert(0, strSelected); } } catch(Exception E) { MessageBox.Show(E.ToString()); } this.listBox1.Items.Clear(); listBox1.Visible = false; //SendKeys.Send("{BS}"); //one BACKSPACE bEnter = true; } else return;} 为什么我用richtextbox1.lines[iLineIndex] = "XXX";不行啊 采用串口通信、AT命令实现华为CDMA3G无线网卡拨号上网 急!!通过反射IList<T>取值问题 C#可以这样写做吗? 帮忙看下这段datagriview粘贴事件程序逻辑上的错误 在代碼裡,改變空間的背景色 各位高手,给我看一下这个代码,问题出在哪? 如果让我的程序最大化时不挡住任务栏? 公网IP改变后,会不会触发什么事件还是自己写监控程序? HttpWebRequest得到乱码? 如何捕获COM异常 奇怪!升级VS2005后发现 DevExpress V3 组件的EditValue属性不能绑定 请问Access 中是否有象SQLServer能取出数据库中所有的表
源玛如下:
private void EnterKeyEvent(System.Windows.Forms.KeyEventArgs e)
{
string strContent = "";
string strSelected = "";
int iLineIndex = 0; strContent = GetCurLineString(out iLineIndex);
if(listBox1.Items.Count !=0 || listBox1.Visible == false)
{
strSelected = this.listBox1.Items[0].ToString(); try
{
if(strContent.IndexOf("(") != -1) {
this.richTextBox1.Lines[iLineIndex] = "";
this.richTextBox1.Lines[iLineIndex] = strContent + strSelected;
//this.richTextBox1.Text.Insert(0, strContent + strSelected);
}
else
{
this.richTextBox1.Lines[iLineIndex] = "";
this.richTextBox1.Lines[iLineIndex] = strSelected; //this.richTextBox1.Text.Insert(0, strSelected);
}
}
catch(Exception E)
{
MessageBox.Show(E.ToString());
}
this.listBox1.Items.Clear();
listBox1.Visible = false;
//SendKeys.Send("{BS}"); //one BACKSPACE
bEnter = true;
}
else return;
}