1. Home
  2. Computing & Technology
  3. Delphi Programming

Positioning the caret in a line in a Memo or RichEdit

By Zarko Gajic, About.com Guide

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

Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Using VCL Components
  5. TMemo, TRichEdit
  6. Positioning the caret in a line in a Memo or RichEdit

©2009 About.com, a part of The New York Times Company.

All rights reserved.