回复 5楼iceman的帖子
int start = 0;
int length = 0;
private void mailMerge1_FieldMerged(object sender, TXTextControl.DocumentServer.MailMerge.FieldMergedEventArgs e)
{
getCollection = new Dictionary<int, int>();
if (e.MailMergeFieldAdapter.ApplicationField.Name=="content")
{
start = e.MailMergeFieldAdapter.Start;
length = e.MailMergeFieldAdapter.Length;
getCollection.Add(start-1, length);
this.textControl1.Select(start, length);
this.textControl1.Selection.TextBackColor = Color.Red;
}
}
private void textControl1_Changed(object sender, EventArgs e)
{
int a = start-1;
int c = this.textControl1.InputPosition.TextPosition;
int b = length+1;
if (c>a && c<(a+b))
{
}
else
{
//如何退出事件
return;
}
}
问题:textControl1_Changed 怎么退出事件??? |