Date/Time Insertion - Cursor Position

General TRichView support forum. Please post your questions here
Post Reply
parad0x
Posts: 14
Joined: Fri Feb 17, 2006 11:40 pm

Date/Time Insertion - Cursor Position

Post by parad0x »

Hi,

I am Inserting the Date / Time into a TRichViewEdit from a TListBox from a Seperate Form but everytime I call Format or Reformat or even FormatTail it only Inserts the Date or Time at the bottom of the document.

How can I have it to Insert it at the Current Cursor Position?

Many Thanks

Parad0x
Sergey Tkachenko
Site Admin
Posts: 17561
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

RichViewEdit1.InsertText(DateTimeToStr(Now))

Without Format and Reformat.
parad0x
Posts: 14
Joined: Fri Feb 17, 2006 11:40 pm

Post by parad0x »

Thank You. That worked well, I was trying to do AddText instead of InsertText!
Sergey Tkachenko
Site Admin
Posts: 17561
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Add*** methods must be used for document generation (rv.Clear; several rv.Add***; rv.Format).
For insertion in the caret position, use Insert*** methods (the only exception - InsertRVFFromStream)
Post Reply