Hi All, I am porting some code from Delphi to lazarus and I needed to change a Trichedit to a Tmemo. Now the code
with Memo2 do Perform(EM_LINESCROLL, 0, Memo_lines_added); does not work. It is supposed to scroll the TMemo to the bottom of the window. I tried to use TRichView but it won't even display lines e.g. Richview1.lines.add( 'hello' ) does not work!!! var Memo_lines.added : integer; procedure Tform2.SnipMemoText(var Memo2 : tMemo; MaxSize : integer); var i : integer; begin // make it faster with BeginUpdate / EndUpdate {delete excess lines} Memo2.Lines.BeginUpdate; for i := 0 to Memo2.Lines.Count - MaxSize - 1 do Memo2.Lines.Delete(0); Memo2.Lines.EndUpDate; with Memo2 do Perform(EM_LINESCROLL, 0, Memo_lines_added); Memo_lines_added := 0; end; { SnipMemoText } Best Regards, PEW Hobart, Tasmania, Australia -- Proudly developing Quality Cross Platform Open Source Games Since 1970 with a Commodore PET 4016 with 16 KRAM http://pews-freeware-games.org (<--- brand new) -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus