开发者

richtextbox text range attributes -- protected, hidden, backcolor, etc -- can i set them without selecting a range?

开发者 https://www.devze.com 2023-01-13 08:37 出处:网络
i want to be able to protect, hide, and highlight different ranges of text within a richtextbox without actually selecting the text -- which is what you seem to have to do for the SelectionProtected a

i want to be able to protect, hide, and highlight different ranges of text within a richtextbox without actually selecting the text -- which is what you seem to have to do for the SelectionProtected and SelectionBackColor or w/e properties开发者_开发问答.

how can i do this programatically? I looked around in reflection and found the SetCharFormat method, but I can't really tell how I'd use it to change the aforementioned properties on a specific range of text instead of the selection.

0

精彩评论

暂无评论...
验证码 换一张
取 消