Export to GitHub

alsing - issue #17

Problem in EditViewControl.ScrollIntoView()


Posted on Feb 3, 2012 by Grumpy Lion

The EditViewControl.ScrollIntoView() method does not work correctly on a SyntaxDocument that has just been opened but has not been rendered yet. Rendering the document calls EditViewControl.InitVars() which sets some important visibility parameters. Without those parameters ScrollIntoView() messes up the viewport of the document.

Adding InitVars() as the first call in EditViewControl.ScrollIntoView() fixed the problem for me.

What steps will reproduce the problem? 1. Open a view in a SyntaxBoxControl and immediately navigate to a line in the document with something like this:

editor.SyntaxBox.GotoLine(lineNumber); editor.SyntaxBox.Caret.MoveEnd(true); editor.SyntaxBox.ScrollIntoView();

What is the expected output? What do you see instead?

The selected line should be visible within the document. But the selected line is above the visible view port and it is not possible to scroll up with the mouse wheel or the scroll bar handle (scroll bar up/down buttons are still working though)

What version of the product are you using? On what operating system?

1.4.10

Please provide any additional information below.

Status: New

Labels:
Type-Defect Priority-Medium