Posted 15 years ago
by Dave Conkey
Version: 4.0.0284
Platform: .NET 2.0
Environment: Windows Vista (32-bit)
Example Code:
After clicking the button, the current view unexpectedly scrolls to the caret location.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
string text = "";
for(int i = 0; i < 300; i++)
{
text += "sdsdfsfgsg" + Environment.NewLine;
}
syntaxEditor1.Document.Text = text;
syntaxEditor1.Caret.Offset = 1500;
syntaxEditor1.SelectedView.ScrollToDocumentStart();
}
private void button1_Click(object sender, EventArgs e)
{
syntaxEditor1.Document.Reparse();
}
}