Autor Beitrag
sam3st
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55

Win XP
D7 Enterprise
BeitragVerfasst: Di 29.11.05 18:37 
dsa


Zuletzt bearbeitet von sam3st am Do 01.12.05 22:42, insgesamt 1-mal bearbeitet
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Di 29.11.05 18:53 
Hi,
vielleicht hilft dir das:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
function WB_ScrollTo(WB: TWebBrowser; Position: TWBPosition): Boolean;
var
  ParentW: OLEVariant;
begin
  Result := WB.Document <> nil;
  if Result then
  begin
    ParentW := WB.OleObject.Document.ParentWindow;
    case Position of
      wbPosBottom: ParentW.ScrollTo(0, MaxInt);
      wbPosTop: ParentW.ScrollTo(0, 0);
      wbPosRight: ParentW.ScrollTo(ParentW.Screen.Width, 0);
    end;
  end;
end;

//Aufruf:
procedure TForm1.Button1Click(Sender: TObject);
begin
  WB_ScrollTo(WebBrowser1, wbPosBottom);
end;

ungetestet
sam3st Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55

Win XP
D7 Enterprise
BeitragVerfasst: Di 29.11.05 19:08 
folgendes erkennt der compiler nicht :-(

TWBPosition
wbPosBottom
wbPosTop
wbPosRight
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Mi 30.11.05 19:28 
user profile iconsam3st hat folgendes geschrieben:
folgendes erkennt der compiler nicht :-(

TWBPosition
wbPosBottom
wbPosTop
wbPosRight


Hast du die Units ActiveX und MSHTML eingebunden? Ansonsten bin ich ratlos...
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Mi 30.11.05 23:25 
Hallo,

Wenn Ihr schon Code Copy&Pasted dann kopiert den ganzen Code:

www.swissdelphicente...showcode.php?id=1186

Sonst gibt's ja auch GOOGLE, gibt dort WB_ScrollTo ein und sollte fündig werden.
sam3st Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55

Win XP
D7 Enterprise
BeitragVerfasst: Do 01.12.05 17:04 
Titel: toll hab ein beispiel von dir gefunden toms
aber dort gibts bei nicht "TWBPosition"

bitte noch n tipp...
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Do 01.12.05 17:19 
TWBPosition wird ein Record sein, oder?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
TWBPosition = record
wbPosBottom: integer;
wbPosTop: integer;
wbPosRight: integer;
end;

_________________
Programmers never die, they just GOSUB without RETURN
sam3st Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55

Win XP
D7 Enterprise
BeitragVerfasst: Do 01.12.05 21:39 
Titel: so geht das aber nicht
hallo habs jetzt so geschrieben wie von toms...

jetz scollt er ein paar mal aber wenn es etwas mehr zeilen werden spingt er immer zur selben stelle (wenn ein chatteilnehmer eine nachricht eingibt) statt ganz nach unten!
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Fr 02.12.05 21:18 
user profile icontoms hat folgendes geschrieben:
Hallo,

Wenn Ihr schon Code Copy&Pasted dann kopiert den ganzen Code:

www.swissdelphicente...showcode.php?id=1186

Sonst gibt's ja auch GOOGLE, gibt dort WB_ScrollTo ein und sollte fündig werden.


*Räusper*

Ich hatte den Code auf meiner Festplatte, also in meiner eigenen kleinen Snippets-Sammlung ;-)