+ Reply to Thread
Results 1 to 2 of 2

Thread: html in helphi

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Location
    Entrypoint
    Posts
    27

    html in helphi

    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?

  2. #2
    Junior Member
    Join Date
    Nov 2011
    Location
    Entrypoint
    Posts
    27
    so i tried this snippet from the internet, but i am just getting debugger exception/access violations wtf.
    Code:
    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;
    http://delphi.about.com/od/adptips20...ltip0604_5.htm

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Html Injection
    By xf0 in forum Tutorials and Articles
    Replies: 11
    Last Post: 14-07-2011, 21:14
  2. Get Html Source
    By dreampower in forum Delphi Help
    Replies: 8
    Last Post: 10-03-2011, 19:50
  3. HTML Boobies!!!
    By ┌∩┐(◣_◢)┌∩┐ in forum Off-Topic
    Replies: 16
    Last Post: 30-11-2010, 12:56
  4. HTML Tag
    By msrox in forum General Programming Help
    Replies: 4
    Last Post: 19-04-2005, 12:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.