Posted 16 years ago
by Matt Adamson
Guys
I have some code such asAs using a single horizontal scroll bar to scroll to editor ( single lines ) at the same time. However I would like to know how I can set the LargeChange value effectively rather than hard coding, perhaps calculating from the max no of characters horizontal in either of the two editor views.
In a specific example the Maxium property is set to 732. Obviously the default for LargeChange of 10 is too small. If all characters can be fitted into two horizontal pages then surely the size of large change should be approximately 366 in this example? If this is the case how could I calculate this better?
I have some code such as
hScrollBar.Maximum = Math.Max( leftFileSingleLineSyntaxEditor.SelectedView.HorizontalScrollBarMaximum,
rightFileSingleLineSyntaxEditor.SelectedView.HorizontalScrollBarMaximum);
hScrollBar.LargeChange = 300;
In a specific example the Maxium property is set to 732. Obviously the default for LargeChange of 10 is too small. If all characters can be fitted into two horizontal pages then surely the size of large change should be approximately 366 in this example? If this is the case how could I calculate this better?