Posted 18 years ago
by shark92651
I have an array of strings that I want to load into the SyntaxEditor. The code below works but it is a bit slow and I can watch the scrollbar change size as it loads the lines. What is the fastest way to load an array of strings and how can I suspend all screen updates until the entire array is loaded? In my particular project I have to read from the array and cannot simply convert the array to a single string as I am inserting additional lines into the text as I process the array.
I tried using SuspendPainting()/ResumePainting() but I still can see the scroll bar change size as it loads.
edFileA.SuspendPainting();
for (int i = 0; i < fileA.Length; i++)
{
edFileA.Document.AppendText(fileA[i]);
}
edFileA.ResumePainting();
I tried using SuspendPainting()/ResumePainting() but I still can see the scroll bar change size as it loads.
edFileA.SuspendPainting();
for (int i = 0; i < fileA.Length; i++)
{
edFileA.Document.AppendText(fileA[i]);
}
edFileA.ResumePainting();