Recent

Author Topic: Complex HTML-Viewer Component?  (Read 22684 times)

greendayzero

  • New Member
  • *
  • Posts: 11
Complex HTML-Viewer Component?
« Reply #15 on: December 26, 2007, 11:14:52 am »
{ I did a search and found the TurboPower sourceforge page.  was searching for something I'm working on.

To use IPHtmlPanel, try this: }

procedure TForm1.Button3Click(Sender: TObject);
var sl    : TStringList;
      ms  : TMemoryStream;
      htm l: TIpHtml;
begin
     try
     ms:=TMemoryStream.Create;
     try
        sl:=StringListLoader(sl,'my.html');
        sl.SaveToStream(ms);
        html:=TIpHtml.Create;
        ms.seek(0,0);
        html.LoadFromStream(ms);
        IpHtmlPanel1.SetHtml(html);
        finally
        ms.free;
     end;
     finally
     sl.free;
 end;
end;        
{
Tried to format nicely, didn't allow  :(
In conclusion,

Tim }

greendayzero

  • New Member
  • *
  • Posts: 11
Complex HTML-Viewer Component?
« Reply #16 on: December 26, 2007, 08:27:39 pm »
My apologies, I used a custom function in the last post.  Here are the required corrections to make it work right:

procedure TForm1.Button3Click(Sender: TObject);
var sl : TStringList;
ms : TMemoryStream;
htm l: TIpHtml;
begin
 try
     ms:=TMemoryStream.Create;
     sl:=TStringList.Create;
     try
        sl.LoadFromFile('my.html');
        sl.SaveToStream(ms);
        html:=TIpHtml.Create;
        ms.seek(0,0);
        html.LoadFromStream(ms);
        IpHtmlPanel1.SetHtml(html);
        finally
        ms.free;
     end;
     finally
     sl.free;
  end;
end;

Whiterawen

  • New Member
  • *
  • Posts: 12
    • Lirein's Homepage
Re: Complex HTML-Viewer Component?
« Reply #17 on: July 21, 2010, 08:02:35 pm »
Quote from: RudieD
As far as I know the TIpHtmlPanel doesn't support css.

It´s open source isn´t it? So it would be great if someone extends it to support css =)

Or posts a bounty http://wiki.lazarus.freepascal.org/Bounties

Now I'm started to rewriting code of TIpHTML* components to partially support CSS 2.0 such as foreground/background images, colors and shapes. I don't planned to implement layers and full PNG support on All platforms. I already fix some bugs and make some of improves in code, that now it full support CSS color and background color assignment.
Probably I had post code to the my website after it Beta or Full Relise.
WBR, Vanya Batalin.