This project is read-only.

Load a text file in scintillaNet like a richtextbox

Topics: Developer Forum, User Forum
May 18, 2009 at 2:06 PM

Hello everybody.

Someone know if possible to load a text file in scintillaNet like the richtTextbox.load command.

Or the only way is to copy line by line in scintilla.text properties?

Let me know see you and thank for all.

May 18, 2009 at 3:21 PM

Hi Luka,

I guess the easiest way to load a complete File is this:

using (TextReader reader = new StreamReader(<FilePath>, Encoding.UTF8))
         sciDocument.Text = reader.ReadToEnd();

Or a lot easier

sciDocument.Text = File.ReadAllText(<FilePath>);


Hope it helps.

Best regards


May 18, 2009 at 3:36 PM

Hi, Klingel.

Thanks very Helpfull...

the first way is better that last one, because there are using(....) and so can delete everything immediatly when finish to load file.

See you