Topic: Memo Line

Is there a way to retrieve the line number in a memo field when double clicking on a line within the control? I want to ultimately retrieve just the one text line that was double clicked on.

Re: Memo Line

Hello ehwagner

Find this on Embarcadero site :

procedure TMyForm.BitBtn1Click(Sender: TObject);
var   iLine : Integer ;
begin
   iLine := Memo1.Perform(em_LineFromChar, $FFFF, 0);
   { Note: First line is zero }
   messageDlg('Line Number: ' + IntToStr(iLine), mtInformation, [mbOK], 0 ) ;
end;

Not yet tried with MVD, so I don't know if MV supports Memo1.Perform instruction.

Can this be a clue for you ?

JB

Re: Memo Line

Please download latest beta version
https://www.dropbox.com/s/sunrl4ano9340 … a.zip?dl=0


I have added two new properties for the Memo

iLine := Form1.memo1.CaretPosY; // current line
iPos := Form1.memo1.CaretPosX; // current position
Dmitry.

Re: Memo Line

Awesome! Thank you much Dimitry. And thank you Jean for your efforts as well.