2 pièce(s) jointe(s)
Problème d'affichage d'image avec HtmlViewer
Bonjour :D .
Tout , ou presque, est dans le titre.
Code Lazarus:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, FramBrwz;
type
{ TForm1 }
TForm1 = class(TForm)
FrameBrowser1: TFrameBrowser;
procedure FormActivate(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormActivate(Sender: TObject);
begin
FrameBrowser1.LoadFromFile('///home/naute/Applications/Lazarus/lazarus-2.0.13/projects/htmlviewer/test.html');
end;
end. |
Code HTML :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Test HtmlViewer</title>
</head>
<body>
<div>
<p>Essai d'affichage d'une image PNG :</p>
<img src="cheetah.png" alt="cheetah.png" />
</div>
</body> |
Résultat :
Pièce jointe 597133
Pour info, voilà ce que donne le même fichier HTML avec Firefox :
Pièce jointe 597135
Si quelqu'un a une idée, je suis preneur.
Merci d'avance,
naute