richtextbox text range attributes -- protected, hidden, backcolor, etc -- can i set them without selecting a range?
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.
精彩评论