Forum > SynEdit
how to get line number of text under mouse.position
Martin_fr:
--- Quote from: Josh on June 19, 2023, 11:45:46 pm ---when i was testing ideas, i tried a few of those, but they are based on the position of the caret in synedit, unless i done something wrong of course.
--- End quote ---
None of them should interact with or require the caret.
Pixels => as in mouse, but afaik must be relative to cilentrect.
ScreenXy => text coordinates in the window, but without scrolling => the visible "grid" => top corner is always 1,1
TextXy => (IIRC) physical coordinates in the text.
--- Quote ---it was giving me the line after the one i was after, so i thought it was something to do with one function being non zero based.
--- End quote ---
Those functions are IIRC all 1 based.
The SynEdit.Lines[] property is 0 based.
The carte and SynEdit.LeftChar => 1 based
TopLine... I have to check...
If you look at the sources
- SomeVal: IntIdx; => 0 based (index)
- SomeVal: IntPos; => 1 based (position)
But not everything already has those types.
Navigation
[0] Message Index
[*] Previous page