Solved

TWebbrowser : How to scroll

Posted on 2001-07-16
2
301 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 150 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

756 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