ScrollToEnd does not scroll to end when using WordWrap
See original GitHub issueMy AvalonEdit has to show the content of a log file. Changes to the log file will be attached automatically with AppendText(). Afterwards the editor should scroll to the end of the document. But it does not. A few lines (the ones after the selected one) are (almost) always missing. See screenshot:
XAML:
<avalonEdit:TextEditor xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
Grid.Row="0"
Name="LogBox"
FontFamily="Consolas"
FontSize="9pt"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Visible"
/>
Some code:
LogBox.Document.UndoStack.SizeLimit = 0;
LogBox.Options.EnableRectangularSelection = true;
LogBox.Options.EnableVirtualSpace = true;
LogBox.Options.HighlightCurrentLine = true;
LogBox.TextArea.TextView.LineTransformers.Clear();
LogBox.TextArea.TextView.LineTransformers.Add(new CustomDocumentColorizingTransformer());
LogBox.IsReadOnly = true;
LogBox.WordWrap = true;
SearchPanel.Install(LogBox);
LogBox.ScrollToEnd();
I’ve also tried ScrollToLine() and ScrollToVerticalOffset() but the result stays the same.
The only thing which solves my issue (but is not an option for me) is to set WordWrap to false.
Any suggestions?
Best regards, Carsten
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
ScrollToEnd after update data for Flatlist - react native
I want to add a new item to data then scroll to bottom of list. I use scrollToEnd method but it did not...
Read more >Successfully using scrollToEnd() in chat app, but how to ...
So the end solution is to remove the ScrollView and the ScrollToEnd() function and just have a FlatList that is inverted. Thanks again...
Read more >Window scrollTo() Method
Scroll the document to the horizontal position 500: window. ... Description. The scrollTo() method scrolls the document to specified coordinates.
Read more >Flatlist scrollToEnd janky when streaming new content into ...
I am looking to solve this so I can successfully keep the flatlist scrolling to the bottom as new content is streamed in....
Read more >Scroll to last line - EditorGadget - PureBasic Forums - English
My application has a large EditorGadget on its main window that reports all inputs/outputs with the embedded device it connects to.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I solved it by calling ScrollToEnd twice.
Doesn’t work for me. Or let’s say: It does not work if there are wrapped lines in the view. If there are only “not wrapped” lines in the view, everything’s fine.
I just saw the the search has the same issue: The found result may be out of the view if there are wrapped lines in the view. So you have to scroll a view lines to see the result.