I'm investigating ways of determining the current line number, but have encountered a problem in that the returned VisibleLineCount always seems to be incorrect. I've tried a few different fonts and font sizes but there's no obvious pattern.
I'd like to be able to disable editing in specified regions and can do this if I know the line number.
Is there any way to specify a different colour for single lines?
The VisibleLineCount returns the number of lines that are visible, not the amount of text. to know the amount of text, you can use TMSFMXMemo.Lines.Count
There is no way to specify a specific color for a specific line, all styling is done through a separate non-visual style component.
I understand that - it's the number of visible lines that's incorrect.E.g. on my form if I set both memo and gutter to Consolas 14 then the gutter shows 1-24 while the VisibleLineCount = 23. The difference can vary between 1 and 2. This is the case for both an empty and populated memo.