Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


How to know the beginning position of n-th line in TRichedit

Posted on 1999-07-02
Medium Priority
Last Modified: 2010-04-06
I want to know the position of the number of
the beginning of n-th line in TRichedit.
for exmaple.
pos := 0;
for i:=0 to Lines.Count do
  pos := pos + Length(Lines.Strings[i]);
But pos is not the beginning of TRichEdit;
How to get it?
Question by:mathematics
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 15

Expert Comment

ID: 1385800
Have you tried with "Lines.Count - 1" ?

I don't quite understand what you mean.

LVL 27

Accepted Solution

kretzschmar earned 80 total points
ID: 1385801
hi mathematics

this will return the position of a specific line (LineNumber)
pos := richedit1.perform(EM_LINEINDEX,LineNumber,0);


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question