Category / Section
How to update the loaded content in WinForms SyntaxEditor (EditControl)?
1 min read
Update loaded content
In EditControl, you can update the loaded content from an external source. Refer to the following code examples.
C#
this.editControl1.Text = string.Empty;
// Open a text file to extract
using (System.IO.StreamReader file = new System.IO.StreamReader(@"..\\..\\Files\\page.php"))
{
string str = file.ReadToEnd();
this.editControl1.Text = str;
}
VB
Me.editControl1.Text = String.Empty
' Open a text file to extract
Using file As New System.IO.StreamReader("..\\..\\Files\\page.php")
Dim str As String = file.ReadToEnd()
Me.editControl1.Text = str
End Using
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/EditControlSample1870841073.zip