I want to display some html in delphi, I found the TWebbrowser but I don't see any way to add html to it :/ any ideas?
I want to display some html in delphi, I found the TWebbrowser but I don't see any way to add html to it :/ any ideas?
so i tried this snippet from the internet, but i am just getting debugger exception/access violations wtf.
http://delphi.about.com/od/adptips20...ltip0604_5.htmCode:procedure AppendToWB(WB: TWebBrowser; const html: widestring) ; var Range: IHTMLTxtRange; begin Range := ((WB.Document AS IHTMLDocument2).body AS IHTMLBodyElement).createTextRange; Range.Collapse(False) ; Range.PasteHTML(html) ; end; procedure TForm1.FormCreate(Sender: TObject); var s: string; begin s:= '<a href="http://delphi.about.com">go to About Delphi Programming</a>'; AppendToWB(WebBrowser1,s) ; end;
There are currently 1 users browsing this thread. (0 members and 1 guests)