trichview.support
| 
 Re: Inserting a paragraph  | 
| 
 Author  | 
 Message  | 
| 
 Sergey Tkachenko  | 
 Posted: 12/10/2003 20:41:29 You can move the caret at the propert place, and insert text there. The following code inserts a new text as a second paragraph: // searching for the end of the first paragraph i := 0; while (i+1<RichViewEdit1.ItemCount) and not RichViewEdit1.IsParaStart(i+1) do inc(i); // moving caret RichViewEdit1.SetSelectionBounds(i, RichViewEdit1.GetOffsAfterItem(i), i, RichViewEdit1.GetOffsAfterItem(i)); // inserting RichViewEdit1.InsertText(#13'THIS IS AN INSERTED PARAGRAPH'); > > Hi, > Assuming my paragraph are as follows: > > This is the first. > This is the second. > This is the third. > > I want to insert a sentence so that the last two paragraphs are automatically > moved down. After inserting , the above will appear as this: > > This is the first. > THIS IS AN INSERTED PARAGRAPH. //This is the inserted one. > This is the second. > This is the third. > > How do I achieve the above feat? Is there a special procedure for inserting > between paragraph? > > Thanks. >  | 
Powered by ABC Amber Outlook Express Converter