-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll position/moveTo() issue #395
Comments
I realise that |
I guess a tidy way to do this would be if you could get the Y value of a particular character in the view port within the |
It sounds somewhat similar to #385. |
It is! I hadn't noticed the I have done a quick implementation, and it mostly works, except that there is a slight drift everytime I call Is this because |
First question we should all ask, which version of RTFX are you using?
Due to changing the paradigm of the code, this method should probably be renamed to be clearer as to what it does. Here's my understanding of what you're trying to do.
You want to be able to append Text 2 to the area and/or delete Text 1 while the viewport appears to be unchanged (it still displays the same content as before), correct? |
I am using Yes, that is what I am trying to achieve. |
Since you are using wrapped text, the solutions we could implement (by exposing more of VirutualFlow's API) would never fully get rid of that slight shift in the view. For example, you could call If you wanted accurate scrolling irregardless of the virtualflow's content, you could look at implementing FXMisc/Flowless#5. |
Woah, for some reason I have got it to work "perfectly" by doing:
I noticed that is almost worked with |
Closing as this should be resolved for the most part by #418. |
Hi there.
I am trying to design a "teminal-style" pane which displays incoming data from a serial port, using a
StyleTextArea
object.New text is appended onto the end of the
StyleTextArea
object and removed from the beginning, to keep the total number of characters in the view the same.I want the user to be able to scroll to say, halfway, and have the text he/she sees remain constant. Keeping the current view constant is easy if I had a way of finding what value
moveTo()
would result in the current view, as I can count how many characters have been removed, and then callmoveTo()
again withnewValue = oldValue - numCharsRemoved
.If there any way to achieve this functionality? I was able to do it with a normal
TextFlow
node using thescrollY
value (when it was wrapped in aScrollPane
), but since I read thatgetEstimatedScrollY()
on aVirtualizedScrollPane
does not work correctly if their are font size changes or wrapped lines, I'm not sure if I can rely on this.The text was updated successfully, but these errors were encountered: