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

Positioning the caret in a line in a Memo or RichEdit

By , 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

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. 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.