I am opening documents (Q3 sp1 2010) and I am looking for expressions for changing theirs background. This is the code:
deltaY = rtb.VerticalScrollBar.Value; // page 1
.
.
this.rtb.Document.CaretPosition.MoveToPosition(end); // page 5
.
.
this.rtb.ChangeTextHighlightColor(Color));
.
.
rtb.VerticalScrollBar.Value = deltaY; // page 1 but does not show content of page 1
The scrollbar takes the saved value but the page does not change to the corresponding position as the verticalScrollbar.Value. How can I synchronize them?