You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a small issue I can't seem to solve: I want to preserve the vertical scroll position when replacing text via SetText. Currently, the editor always scrolls to the top. I'm wary of any line- or-caret-based logic for that, since I have word-wrapping active and some of the content I set has some really long lines that wrap multiple times - unless Scintilla can somehow deal with that. I haven't found any matching properties for that anyway.
My initial approach was to get the ScrollBar of the editor via the VisualTree and try to access the position (which works, the Value property seems to contain the position), however setting it has ultimately no effect. I can set the value, but, checking the ValueChanged event, the value gets always overwritten with 0 immediately after (from somewhere within the framework).
Do you have any idea how to achieve that?
The text was updated successfully, but these errors were encountered:
Hi,
I have a small issue I can't seem to solve: I want to preserve the vertical scroll position when replacing text via
SetText
. Currently, the editor always scrolls to the top. I'm wary of any line- or-caret-based logic for that, since I have word-wrapping active and some of the content I set has some really long lines that wrap multiple times - unless Scintilla can somehow deal with that. I haven't found any matching properties for that anyway.My initial approach was to get the
ScrollBar
of the editor via the VisualTree and try to access the position (which works, theValue
property seems to contain the position), however setting it has ultimately no effect. I can set the value, but, checking theValueChanged
event, the value gets always overwritten with 0 immediately after (from somewhere within the framework).Do you have any idea how to achieve that?
The text was updated successfully, but these errors were encountered: