Solved

TWebbrowser : How to scroll

Posted on 2001-07-16
2
266 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 150 total points
Comment Utility
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
Comment Utility
This does it great.

thanks Inthe
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now