I don't think there is an AppendText method, but you could just add onto the existing text, such as:
this.ultraFormattedTextEditor1.Text += "Blah";
-Matt
Hello,
Is there any plan to add an AppendText to the FormattedTextEditor?
The problem with using .Text += "Blah" is that when you have very long texts, C# get enormous text objects to dissallocate from memory everytime you add something to the text. I am currently using version 8.2 of the Infragistics components, has something been added relating to this feature since then?
Regards, Johan
Johan,
The closest I can think of is to use the InsertValue method on the EditInfo, which will add the value to the current caret position:
this.ultraFormattedTextEditor1.EditInfo.InsertValue("Blah");
I believe that this will only require the FormattedTextEditor to parse the new value into the various node objects, so it should be more efficient than resetting the Text property as a whole.
The '+=' will be even worse than that with the FormattedTextEditor, I believe, since in addition to having to create the new string every time, it's re-setting the Text of the control, which may be triggering the control to parse the entire value again into the internal node structure, as opposed to the InsertValue that may only trigger that for the new portion.
That solution worked great, thanks Matt. The only problem was that I couldn't use ReadOnly = true on the control (I only add text programmatically), but that problem is manageable.
The problem with using the '+' operator is that it creates new strings every time. Which of course creates a lot of object to dispose for the environment.
From what I understand, the String.Format method or using a StringBuilder is a much more efficient way to concetenate two string - as opposed to using the plus operator.