1. Computing

Positioning the caret in a line in a Memo or RichEdit

By

To position the caret in a line in a Memo (TMemo) or RichEdit (TRichEdit) you must use this:

~~~~~~~~~~~~~~~~~~~~~~~~~
With Memo1 do
   SelStart := Perform(EM_LINEINDEX, Line, 0) ;
~~~~~~~~~~~~~~~~~~~~~~~~~
Here are some more TMemo tips: Memo to the Max

Delphi tips navigator:
» How to retrieve control identifiers for all the controls on a common dialog.
« Download a file from the Internet with progress indicator

©2014 About.com. All rights reserved.