回复 6楼etsoft的帖子
可以解决,需要先获取当前选择位置文本样式,再设置给 TX :
- private void textControl1_InputPositionChanged(object sender, EventArgs e)
- {
- TXTextControl.InputPosition ip = this.textControl1.InputPosition;
- this.textControl1.Select(ip.TextPosition, 1);
- this.textControl1.InputFormat.TextColor = this.textControl1.Selection.ForeColor;
- this.textControl1.InputFormat.TextBackColor = this.textControl1.Selection.TextBackColor;
- this.textControl1.Select(ip.TextPosition, 0);
- }
复制代码 |