c# - Rich Text Box Select First Character -



c# - Rich Text Box Select First Character -

is there way in c# select first character of text in paragraph in rich text box? want this:

richtextbox.selection.select(0, 1);

0 beingness start position , 1 beingness selection end position.

you utilize textrange object that. should homecoming first character in richtextbox

textrange justthefirst = new textrange(richtextbox.document.contentstart, richtextbox.document.contentstart.getpositionatoffset(1)); string text = justthefirst.text;

c# wpf

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -