PeterPanino / thtmlviewer

Automatically exported from code.google.com/p/thtmlviewer
Other
0 stars 0 forks source link

htmlviewer kills other components #332

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

first off all yout component is was i need. A preview for my pop client (for 
html mails).

The problem:

If there is htmlviewer started, i loose for example the dbgrid design on the 
same side.

Before starting the dbgrid is normal with datas and rowlines in it.

After starting the grid is white. No datas, no lines, ect.

I startet htmlviewer without any changes:

Only :

var
blob: TBlobField;
ST: TStream;
begin
 try
  blob := TBlobField(dmbeebookauftrag.ZQEMail.FieldByName('em_text'));
  ST := dmbeebookauftrag.ZQEMail.CreateBlobStream(blob, bmReadWrite);
  ST.Seek(0, soFromBeginning);
  ST.Position := 0;

  HtmlViewer1.LoadFromStream(ST);
  //fadremailbearbeiten.FrameViewer1.LoadFromFile('c:\lazarussnap\eigprojekte\mailtext_default.html');
  finally
    blob.Free;
//     dmbeebookauftrag.ZQEMail.Active:=true;
  end;
  //OpenDocument(pfad + 'attach\' + dmbeebookauftrag.ZQEMailattach.FieldByName(
  //  'ematt_filename').AsString);
end;

See the attached pictures.

After closing the form with the htmlviewer I get a sig error.

I hope you can help me.

Thanks

Josef

Original issue reported on code.google.com by infojose...@gmail.com on 10 Feb 2014 at 9:11

Attachments:

GoogleCodeExporter commented 9 years ago
Solved!

I take a string not a stream

for example:

HtmlViewer1.LoadFromString(UTF8Decode(memo1.Text)); 

Your tool is great. Exactly what I need.

regards

Josef

Original comment by infojose...@gmail.com on 11 Feb 2014 at 11:42

GoogleCodeExporter commented 9 years ago
Welcome Josef,

I'm glad that you like THtmlViewer!

The issue might be related to the sample code's freeing the TBlobField "blob" 
instead of the stream "ST".

OrphanCat

Original comment by OrphanCat on 11 Feb 2014 at 10:19

GoogleCodeExporter commented 9 years ago
Thanks.

but I solved it with a string.

I need your component only as a HTML EMail preview.

So my "string methode" ist quit good enough.

Bye

Josef

2014-02-11 23:19 GMT+01:00 <thtmlviewer@googlecode.com>:

Original comment by infojose...@gmail.com on 12 Feb 2014 at 5:52

GoogleCodeExporter commented 9 years ago

Original comment by OrphanCat on 12 Feb 2014 at 7:05