[SOLVED] TSynEdit - line number by point lazarus / 7-LCL ---------------------------------------------------------------------- Dibo · 2010-12-27 02:37 Hi, I'm looking and looking and can't find function which get me line number at some TPoint. There is a lot of similar functions which uses TPoint but useless for my case. I'm store some data on each line in Lines.Object property. I want read this data from line when user click on link (OnClickLink event which have X and Y params) Regards ---------------------------------------------------------------------- theo · 2010-12-27 11:04 Quote from: Dibo on December 27, 2010, 03:37:36 amI'm looking and looking and can't find function which get me line number at some TPoint I think you are doing something wrong with your "looking" ;-) After 30 seconds I've found this Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure T Form1.SynEdit1MouseMove(Sender:TObject;Shift:TShiftState;X,Y:Integer); var RC:TPoint;begin RC:=SynEdit1.PixelsToRowColumn(Point(X,Y)); Captio n:=inttostr(RC.Y);end; ---------------------------------------------------------------------- Martin_fr · 2010-12-27 11:29 IIRC the X,Y in the OnClickLink event are in lines (and columns) already, instead of pixels. So that should be what you need. Otherwhise PixelsToRowColumn PixelsToLogicalPos They differ in how the return the x coordinate. either as char/grid or byte offset. ---------------------------------------------------------------------- Dibo · 2010-12-27 14:20 Ehh I was blind. I was looking function with "line" in name. Thanks everyone.