No, Lenz, reading the file is not te issue. This is easy and can be done with several different methods. What I am looking for is a way to render the html file (or rtf file). So, I want to read the file and display its contents. Displaying (rendering the html) is the issue.
To make it more concrete. Imagine there is a help file in html. When the user clicks on the proper button, I'll read it and display it so the user can see the document. I want a method to display it rendered as it would be rendered in a browser. The editor might be able to do it. But then, I can't find instructions on how to create it, load and display de text. I have also found two lines of code that hint on the way to do it, but I can not learn enough from them. Says the guy: Then in Gambas2 I have a form with Textedit1 and I add: textedit1.text=file.load("filename.html") in my form_open sub I would guess textedit1.text is in a form that, when displayed, will render the file correctly. But then again, I can't find the rest of the code. Thank you. - fernando 2017-07-02 10:07 GMT-03:00 PICCORO McKAY Lenz <mckaygerh...@gmail.com>: > hi fernando,, u must read as stream.. see it: > > here a example minimal: http://gambaswiki.org/wiki/lang/lineinput > > but i think that what do you want its "understand" the file format! right? > > due i guess rtf files have some "rich"text inside.. something in some > binary/specific non ascii/plain text ... > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > > 2017-07-02 7:31 GMT-04:30 Fernando Cabral <fernandojosecab...@gmail.com>: > >> I've browsed the documentation but did not find what I am looking for: a >> way do read a html (or rtf) file and display it using some built in >> method. >> Say, something simple like this: >> >> >> >> >> >> >> >> >> *Public Sub Main() Dim TextFile As File Dim RtfText As String TextFile >> = >> Open "~/Doc.rtf" For Read Line Input #TextFile, RtfText >> FMain.LoadText(RtfFile) *' Here is the rub! >> >> * FMain.ShowmodalEnd* >> >> Regards >> >> - fernando >> -- >> Fernando Cabral >> Blogue: http://fernandocabral.org >> Twitter: http://twitter.com/fjcabral >> e-mail <http://twitter.com/fjcabrale-mail>: fernandojosecab...@gmail.com >> Facebook: f...@fcabral.com.br >> Telegram: +55 (37) 99988-8868 <(37)%2099988-8868> >> Wickr ID: fernandocabral >> WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868> >> Skype: fernandojosecabral >> Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183> >> Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868> >> >> Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos, >> nenhum político ou cientista poderá se gabar de nada. >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > > -- Fernando Cabral Blogue: http://fernandocabral.org Twitter: http://twitter.com/fjcabral e-mail: fernandojosecab...@gmail.com Facebook: f...@fcabral.com.br Telegram: +55 (37) 99988-8868 Wickr ID: fernandocabral WhatsApp: +55 (37) 99988-8868 Skype: fernandojosecabral Telefone fixo: +55 (37) 3521-2183 Telefone celular: +55 (37) 99988-8868 Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos, nenhum político ou cientista poderá se gabar de nada. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user