Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

TWebbrowser : How to scroll

Posted on 2001-07-16
2
Medium Priority
?
397 Views
Last Modified: 2010-04-06
this might be a well knowed one, but here is what I try to do :
After navigating to a page, I would like to scroll to a relevant part
of the document.

I couldn't find ou how to do this.

if somebody has a clue?

thanks
0
Comment
Question by:mhervais
2 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 600 total points
ID: 6286636
hi mark,
easiest way is to use named anchors in the html document then enter full url.

ie:

http://www.microsoft.com/page1.html#anchor1

or if you want to use the scroll method you can ..
example:

procedure TForm1.Button1Click(Sender: TObject);
begin
//sideways
EmbeddedWB1.OleObject.Document.parentWindow.scrollBy(100,0);
//and down
EmbeddedWB1.OleObject.Document.parentWindow.scrollBy(0,200);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
EmbeddedWB1.Go('http://www.experts-exchange.com');
end;



if you go to msdn.microsoft.com (cant remember exact url of page)and look for dhtml methods ,theres a listing of  different methods you can use of ie document object ,i would asume most will be carried forward to ie6.(not tested it yet)

Regards Barry

0
 
LVL 4

Author Comment

by:mhervais
ID: 6286762
This does it great.

thanks Inthe
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Integration Management Part 2
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question