|
-
Nov 29th, 2008, 05:55 PM
#1
Thread Starter
Hyperactive Member
richtextbox line insert
I need to insert a line into a richtextbox and it has to be on line 3 and it needs to move everything down one line. How would i go about doing this?
-
Nov 29th, 2008, 06:21 PM
#2
Re: richtextbox line insert
Find the character position of the first character of the third line. Set the SelectionStart property to that position. Set the SelectionLength to 0. Set the SelectedText property to "your line" & Environment.NewLine.
There is a function available in the RTB to find the first character position of a given line, look for it!
-
Nov 29th, 2008, 07:45 PM
#3
Thread Starter
Hyperactive Member
Re: richtextbox line insert
yup that got me working thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|