Posted 18 years ago
by Joris Koster
-
Paragon Decision Technology

There is an issue with the redraw / erasing of the current line indicator while scrolling.
The steps to reproduce the problem using the SyntaxEditor C# Sample Editor are the following
1) Maximize the app (this is just to get it large enough for step 6)
2) Alter Border.Style to None
3) Alter CurrentLineHighlightingVisible to true
4) Alter Font.Size to 9.75 (such that it exactly alligns with MinimumDisplayLineHeight=17)
5) Alter ScrollBarType to Both
6) Alter Size to 776,357
Now try to scroll using the cursors (such that currentline-indicator moves aswell).
The CurrentLineIndicator isn't erased before scrolling.
The exact sizes do not matter, as long as the entire drawing area is exactly filled with display lines. Any multiple of 17 (MinimumDisplayLineHeight) for the height will do the trick (as long as the horizontal scrollbar isn't visible).
It might seem a bit far-fetched to get into this situation, but we're unfortunately exactly doing this; we resize various controls based upon their content, so e.g., a certain text-control contains 3 lines of text and there is enough space left to show 3 display-lines, we will resize the control (exactly) to do just that.
It seems like the algorithm that is determining the redraw area during scroll is computing that using the wrong ((minimum)line)height.
The steps to reproduce the problem using the SyntaxEditor C# Sample Editor are the following
1) Maximize the app (this is just to get it large enough for step 6)
2) Alter Border.Style to None
3) Alter CurrentLineHighlightingVisible to true
4) Alter Font.Size to 9.75 (such that it exactly alligns with MinimumDisplayLineHeight=17)
5) Alter ScrollBarType to Both
6) Alter Size to 776,357
Now try to scroll using the cursors (such that currentline-indicator moves aswell).
The CurrentLineIndicator isn't erased before scrolling.
The exact sizes do not matter, as long as the entire drawing area is exactly filled with display lines. Any multiple of 17 (MinimumDisplayLineHeight) for the height will do the trick (as long as the horizontal scrollbar isn't visible).
It might seem a bit far-fetched to get into this situation, but we're unfortunately exactly doing this; we resize various controls based upon their content, so e.g., a certain text-control contains 3 lines of text and there is enough space left to show 3 display-lines, we will resize the control (exactly) to do just that.
It seems like the algorithm that is determining the redraw area during scroll is computing that using the wrong ((minimum)line)height.