Posted 18 years ago
by Paul Hasselfeldt
Version: 4.0.0232
Platform: .NET 2.0
Environment: Windows XP (32-bit)

When I set the FirstVisibleDisplayLineIndex property coming from a editor view that does not have/nor need the horizontal scrollbars visible to one that would require the scrollbar it does not become visible immediately.
If you have a window with 10 lines visible, a document of 20 lines and all lines are less than the total columns available to display (so the editors horizontal scrollbar is grayed out). Alter the 16 line to be larger than the number of visible columns. Scroll to the top of the document so that the scrollbar becomes grayed out again. Then add a button with the folling code:The scrollbar will only become visible on the second click even though the line is visible after the first click.
If you have a window with 10 lines visible, a document of 20 lines and all lines are less than the total columns available to display (so the editors horizontal scrollbar is grayed out). Alter the 16 line to be larger than the number of visible columns. Scroll to the top of the document so that the scrollbar becomes grayed out again. Then add a button with the folling code:
private void button1_Click(object sender, EventArgs e)
{
if (editor.SelectedView.FirstVisibleDisplayLineIndex != 8)
editor.SelectedView.FirstVisibleDisplayLineIndex = 8;
else
editor.SelectedView.FirstVisibleDisplayLineIndex = 9;
}