1

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.

Robin
  • 127
  • 10

2 Answers2

2

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;
        }
Krzysztof Lach
  • 1,280
  • 1
  • 12
  • 19
0

The built-in method is OpenFile which, presumably, initializes the control as intended.