Tuesday, February 14, 2006

Getting current line and column from a memo


    To get the current line and column from a memo you must use this:




      With Memo1 do begin

        Line := Perform(EM_LINEFROMCHAR,SelStart, 0);

        Column := SelStart - Perform(EM_LINEINDEX, Line, 0);

      end;



0 Comments:

Post a Comment

<< Home