I'm developing an HTML editor where you can edit code inside the FastColoredTextBox.dll component. I have an option for the SaveFile which i covered here.
So can anyone help with this? Please help.
You just have to load file like to default winforms textbox. fastColoredTextBox1 is just extended textbox. I tried it and it works like charm.
OpenFileDialog ofd = new OpenFileDialog();
if (ofd.ShowDialog() == DialogResult.OK)
{
var loadedText = File.ReadAllText(ofd.FileName);
fastColoredTextBox1.Text = loadedText;
}
The built-in method is OpenFile
which, presumably, initializes the control as intended.