D-Fly / alsing

Automatically exported from code.google.com/p/alsing
0 stars 0 forks source link

Problem in EditViewControl.ScrollIntoView() #17

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by redxiii...@googlemail.com on 3 Feb 2012 at 11:33