设置textrange的属性值后,richtextbox文本将更改. [英] after setting the property value of textrange the richtextbox text is changed.

查看:89
本文介绍了设置textrange的属性值后,richtextbox文本将更改.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个带有RichTextBox的项目,我想给一些关键词加上颜色
着色时-当我更改与Richtextbox关联的textrange的属性值时,文本将更改并且我的光标位置不正确

I created a project that has a richtextbox and i want to color some key words
when coloring- when i change the property value of the textrange that is conected to the richtextbox the text is changed and my cursorplace is not right

推荐答案

如果我理解了您的问题正确地,您可以使用 TextRange对颜色进行更改后修改选择.Select方法 [ ^ ]
If I understood your question correctly, you can modify the selection after making the changes in color by using TextRange.Select Method [^]


这篇关于设置textrange的属性值后,richtextbox文本将更改.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆