Posted 20 years ago
by NSXDavid

One way I am attempting to use SYntaxEditor is for a type of console output. The behavior I'm trying to get is that as data comes from the app, it is appended to editor document. I want it to automatically scroll as it does this... unless the user has scrolled away from the bottom of the document. Only when at the bottom should it autoscroll.
The AppendText() works, and autoscrolls... but I'm having trouble appending text and keeping it from scrolling. I'm trying to determine if the view is already scrolled to the bottom and if so undo the scroll that AppendText() does. Unfortunately that causes a big visual artifact as it bounces to the bottom and then back.
The things I need help with are:
How to determine if I'm already scrolled to the bottom.
How to appendtext() with out scrolling... or in the alternative, undo the scroll without it visually bouncing like that.
Can this be achieved?
-- David
The AppendText() works, and autoscrolls... but I'm having trouble appending text and keeping it from scrolling. I'm trying to determine if the view is already scrolled to the bottom and if so undo the scroll that AppendText() does. Unfortunately that causes a big visual artifact as it bounces to the bottom and then back.
The things I need help with are:
How to determine if I'm already scrolled to the bottom.
How to appendtext() with out scrolling... or in the alternative, undo the scroll without it visually bouncing like that.
Can this be achieved?
-- David