Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TWebbrowser : How to scroll

Posted on 2001-07-16
2
Medium Priority
?
370 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 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

Industry Leaders: 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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

721 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