Posted 18 years ago
by Kasper
Hi,
I would like to take a range of text in the SyntaxEditor, and replace it with some other text. Usually, I would simply select the text, using Editor.SelectedView.Selection.StartOffset and Editor.SelectedView.Selection.EndOffset, and then setting the Editor.SelectedView.SelectedText. This works, but unfortunately, it's slow. It's easy to see that the text is being selected and replaced, and this is in a document with only very few lines. It looks silly, and I would prefer if the user was not able to see what's actually going on, since I have to do this whenever the user changes a property in a PropertyGrid-like control, which can happen many times. What is the recommended way for doing this?
I would like to take a range of text in the SyntaxEditor, and replace it with some other text. Usually, I would simply select the text, using Editor.SelectedView.Selection.StartOffset and Editor.SelectedView.Selection.EndOffset, and then setting the Editor.SelectedView.SelectedText. This works, but unfortunately, it's slow. It's easy to see that the text is being selected and replaced, and this is in a document with only very few lines. It looks silly, and I would prefer if the user was not able to see what's actually going on, since I have to do this whenever the user changes a property in a PropertyGrid-like control, which can happen many times. What is the recommended way for doing this?