I’ve tried to make a logging window (for a serial port) using the TextEditor component.
I have some problems though:
Each time I receive new text I add it to the end of the existing using something like this:
This is a very expensove approach I think, but for now I can live with it.
Upon each update I call
myEditor.moveCaretToEnd() causing the editor to always scroll down to newest text.
But here comes my major concern: I want the user to be able to stay at a specific line by moving the dragging the scollbar. I.e. basically I only want the ‘show newest’ to be active if the scrollbar is already at the end. Unfortunately I can’t see how to get feedback from the scrollbar.
Any ideas ?
Existing components to use?