Good day all,
I'm having a heck of a time trying how to add text programmaticly. I have tried appendtext, insert, EditLocation and can not seem to build a text file dynamically. Could someone please point me in the right location. I'm sure i'm just missing a simple method or property setting.
There are several ways in which to dynamically add text to the EditControl.
First, there is the Insert() method of the EditControl, which has five overrides. The simplest one just takes a string as its single parameter. The other overrides for Insert take an EditLocation. If you specify a location that does not exist (e.g. Line 5 character 6 when there is only one line in the file), the insertion will fail. To perform this, you would need to create blank lines first.
The other way to modify the text would be by setting the Text property of the control.
Also, make sure that you have called NewFile() if you wish to create a blank document. Without this call (or without loading up a file), none of the text functions will work, since there will not be any content to modify.
I hope this helps.
Thanks, and have a great day!
Syncfusion Technical Support