Cursor position in RichEdit

  • Thread starter Thread starter gsb58
  • Start date Start date
G

gsb58

Hi!

I'm new to VB.NET

Anybody that could show me how to find the cursor position in a
RichEdit?

That is: when user click anywhere in the box and there's some text
already, I want to programatically move to a new line and insert time,
make a new line and user will be ready to insert new text.

I would appreciate if someone could show me how to count the amount of
words and place the caret/cursor at the actual point.

Happy programming!
 
Hi!

I'm new to VB.NET

Anybody that could show me how to find the cursor position in a
RichEdit?

That is: when user click anywhere in the box and there's some text
already, I want to programatically move to a new line and insert time,
make a new line and user will be ready to insert new text.

I would appreciate if someone could show me how to count the amount of
words and place the caret/cursor at the actual point.

Happy programming!

I don't know what a richedit is, but if you mean richtextbox then:

You need to look at RichTextBox.SelectionStart,
RichTextBox.SelectionLength, RichTextBox.SelectedText. These methods
return where the cursor is put, how long it is and what text is there.

Good Luck,
Chris
 
Yeah, that's right!

I discovered some answers in the group seconds after posting. I say:
why not read FAQ or search the group BEFORE I post a question?

(Who knows....)

Anyway thanks a lot.
 
Back
Top