Get if the caret is in last line, with resize
Posted: Fri Dec 29, 2006 6:10 pm
A Old your answer:
1) If you really mean "lines":
Code:
rve.GetCurrentLineCol(Line, Col);
InTheFirstLine := (rve.InplaceEditor=nil) and (Line=1);
InTheLastLine := (rve.InplaceEditor=nil) and (Line=rve.GetLineNo(rve.ItemCount-1, rve.GetOffsAfterItem(rve.ItemCount-1));
Lines depend on word wrapping, so when user resizes the editor window, results will be different. The method above is simple, but not very efficient. If you need to call this code often, I can give alternative version.
Dear Sergey, I really need a procedure that works also when the user resize the richviewedit.
Thank you very much.
1) If you really mean "lines":
Code:
rve.GetCurrentLineCol(Line, Col);
InTheFirstLine := (rve.InplaceEditor=nil) and (Line=1);
InTheLastLine := (rve.InplaceEditor=nil) and (Line=rve.GetLineNo(rve.ItemCount-1, rve.GetOffsAfterItem(rve.ItemCount-1));
Lines depend on word wrapping, so when user resizes the editor window, results will be different. The method above is simple, but not very efficient. If you need to call this code often, I can give alternative version.
Dear Sergey, I really need a procedure that works also when the user resize the richviewedit.
Thank you very much.