Autor Beitrag
zero_cool1986
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95

MS DOS ;)
D6
BeitragVerfasst: Mo 29.08.05 12:39 
hi, eine frage wie mache ich eine vorschau sprich ich möchte den geschriebenen html text in webbrowser1 anzeigen lassen weis das jemand? mfg daniel :roll:
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mo 29.08.05 13:00 
Vielleicht apspeichern und dann Webbrowser1.Navigate('[...]');?

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
zero_cool1986 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95

MS DOS ;)
D6
BeitragVerfasst: Mo 29.08.05 13:21 
hab ich gemacht aber wenn ich das aufrufe denn steht da : Aktion abgebrochen....


also der quelltext zum test ist so: ich habe einen ordner im projekt der heißt html und darin ne kleine testseite die heißt 1.html mein quelltext ist volgender zum test:
ausblenden volle Höhe Delphi-Quelltext
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:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, OleCtrls, SHDocVw_TLB;

type
  TForm1 = class(TForm)
    WebBrowser1: TWebBrowser;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
Webbrowser1.Navigate('html/1.html');
end;

end.


was ist falsch? :roll:
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mo 29.08.05 13:41 
Benutz mal einen Absoluten Pfad. Dazu musst du
ausblenden Delphi-Quelltext
1:
Webbrowser1.Navigate('html/1.html');					

durch
ausblenden Delphi-Quelltext
1:
Webbrowser1.Navigate(ExtractFilePath(Application.ExeName)+'html\1.html');					

ersetzen. Eventuell musst du vor html noch einen \ setzen.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.