trichview.com

trichview.support




Re: SetItemText & InsertText


Return to index


Author

Message

Papiya

Posted: 09/02/2004 9:14:47


I was trying to Insert where GetItemText(i)='' but before the blank line,

keeping it as it is but the text was getting inserted in the blank line.

Now my problem is solved by inserting a new line

i.e.InsertText(tmpstr+#13#10);


Thanks and Regards

Papiya


"Sergey Tkachenko" <[email protected]> wrote in message

news:[email protected]...

> InsertText inserts text in the caret position. If there there selection,

> it's deleted before inserting.

>

> SetSelectionBounds(1,1,i,1) selects the first (i-1) characters of the 1st

> item.

> If InsertText is called after it, they will be deleted.

> But it must not happen if InsertText is called after Deselect.

> Can you give me a code which I can run and reproduce this problem?

>

>

> > I need  to  Insert few lines at some point of a formatted TRichViewEdit.

> to

> > take the caret to that item/position I used SetSelectionBounds(1,1,i,1)

;

> > then

> >                   Deselect;

> >                   InsertText(tmpstr);

> >

> > But instead of inserting new line it is just replacing the current one.

> > Then what is the difference between SetItemText and InsertText?

> >

> > and what should I do to insert something in between?

> >

> > Regards,

> > Papiya

> >

> >

>

>





Powered by ABC Amber Outlook Express Converter