Autor Beitrag
MDX
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: Sa 09.08.08 13:32 
Wie kanbn man mit der THMTLViewer Komponente (von hier) eine URL aufrufen?

es gibt zwar loadfromstream, loadfromstring und so was, aber er benötigt mehrere Parameter und ich weiß nicht genuau Welche...

Der THMLViewer soll einfach nur ne Adresse, z.B. WWW.DELPHI-FORUM.DE anzeigen

THX
MDX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: So 10.08.08 14:18 
PUSH :D
nagel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 708

Win7, Ubuntu 10.10

BeitragVerfasst: So 10.08.08 14:27 
Der THTMLViewer ist doch nur Viewer und nicht Browser, oder täusche ich mich? Da gibt's noch 'ne andere Komponente, mit der das funktionieren sollte.
hui1991
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 433

Windows XP, WIndows Vista
Turbo Delphi Explorer| Delphi, PHP,Blitzbasic
BeitragVerfasst: So 10.08.08 14:35 
Du kannst den THTMLViewer nur zum Anzeigen einer Seite verwenden.
Das Laden der Seiten musst du über eine andere Komponente machen.
Mit Indy müsste das gehen. HTML dokument einfügen und wenn ihm ein Bild fehlt, ihm einen Stream geben, dann lädt er sie direkt aus dem Internet.
MDX Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 595
Erhaltene Danke: 4

Windows 8.1, Linux Debian 8, Android Lollipop
Delphi, PHP, Java (Android)
BeitragVerfasst: So 10.08.08 14:45 
Also so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var
html:=String;
begin
idhttp1.get('DIE URL');
thmlviewer1.loadtextstring(html);


Wenn ich das so machen, bekomm ich nur den Quelltext in der THMLViewer Komponente...
hui1991
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 433

Windows XP, WIndows Vista
Turbo Delphi Explorer| Delphi, PHP,Blitzbasic
BeitragVerfasst: So 10.08.08 15:04 
Es gibt da noch ein Ereignis für weitere Daten, in dem kannst du ihm den Stream von der idhttp1 übergeben. Dann müssten alle Bilder usw. geladen und angezeigt werden.
Ich kann grad nicht selber testen da ich nur Turbo Delphi habe. :(
aladin60
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20



BeitragVerfasst: Mo 11.08.08 13:23 
Verwende die Komponente TWebBrowser und deren Methode Navigate. Dann klappt das.

Bernd.
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Mo 11.08.08 15:07 
user profile iconMDX hat folgendes geschrieben:
Also so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var
html:=String;
begin
idhttp1.get('DIE URL');
thmlviewer1.loadtextstring(html);


Wenn ich das so machen, bekomm ich nur den Quelltext in der THMLViewer Komponente...

Klar, du sagst ihm ja auch 'Lade das als Text' ;)

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var html:string;
begin
  html:= IdHTTP1.Get('http://www.delphi-forum.de');
  HTMLViewer1.LoadFromBuffer(PChar(html),Length(html));
end;

Ansonsten LoadFromStrings, aber die TStringList wollte ich grad nicht mit Createn ;)

user profile iconhui1991 hat folgendes geschrieben:
in dem kannst du ihm den Stream von der idhttp1 übergeben. Dann müssten alle Bilder usw. geladen und angezeigt werden.

Oder so. So wirst du auch per Onxxx-Behandlung geladene Daten (css,Bilder...) einbinden.

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."