Problem with TfsSyntaxMemo

edited 3:13AM in FastScript
When I access the fsSyntaxMemo.lines.count the cursor is positioned to the first column and in the first line of the TfsSyntaxMemo.

I do some stuff on keydown or keypress where I need to get the linecount of the TfsSyntaxMemo. If I do so, the cursor jumps to the first line / first column.

I found out that the problem is the LinesChange event. There the fpos is reset, which causes the cursor to jump to the startposition.

I now created a property linecount in a descentend of TfsSyntaxMemo where I set FAllowLinesChange to false, then get lines.count and then set FAllowLinesChange to true again.
This works, but to access FAllowLinesChange, I had to move it from the privat section to the protected in the decleration of TfsSyntaxMemo.

Is there any other way to get linecount without repositioning the cursor? If not, is there a way, that you move FAllowLinesChange to the protected section, because in the other way, I have to do it after every update to a newer version if FS?

Helmut

Comments

  • edited 3:13AM
    The SyntaxMemo is bonus component, use it "as is". It will not be changed in further versions.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.