-Collapse +Expand
Delphi
Search Delphi Group:

Advanced
Delphi To/From
To/FromCODEGuides
Delphi Store
PRESTWOODSTORE

Prestwood eMagazine

October Edition
Subscribe now! It's Free!
Enter your email:

   ► MB Lobby ► Pascal and Delphi Coding Board ► Delphi VCL Topic   Print This     

TWebBrowser scroll bar

TWebBrowser scroll bar in Delphi VCL topic (part of our Pascal and Delphi Coding group).

Quick Search: TWebBrowser   TWebBrowser scroll   TWebBrowser scroll bar  
juanjo75es
 (Inactive)
-- USA
I want to hide the default visible scroll bar of the TWebBrowser component.
How can I do it?
 Posted 25 years ago (Thread Starter)
Comment Quote
About juanjo75es
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #4673, 1 replies
Thread Started 12/27/2001 8:28:00 AM
View Counter=10307
Last Reply Posted 7/3/2007 4:25:59 PM)
Location=-- USA 
Joined=25 years ago   MB Posts=1  
Most Recent Post
Wes Peterson
Prestwood IT
Prestwood IT office in Citrus Heights, CA

I am sorry it's taken so long for you to get a reply.

If you haven't already discovered a solution, you might want to try this (shamelessly copied from an article at http://www.tamaracka.com):

In article <3C7AB74B.1080302@softwarevsi.com>, bryan@softwarevsi.com says...
> Hi
>
> I am using the TWebBrowser to display some HTML files that are on disk.
> I am always getting a scroll bar on the right side of the window, even
> if it is disabled.... I am setting the window size before loading the
> Html file, and there should not be any need for the scroll bar.
>
> Is there a way to hide the scroll bar on the right side of the window
> (and only this scroll bar)??
>

Check out how it's done here:

This will allow you to use two Speedbuttons for scrolling
your page:

procedure TForm1.FormShow(Sender: TObject);
begin
  // MUST navigate first
  WB.Navigate('http://www.borland.com');
end;

procedure TForm1.WBDocumentComplete(Sender: TObject;
const pDisp: IDispatch; var URL: OleVariant);
begin
  // turn off scrollbars!
  while WB.ReadyState <> READYSTATE_COMPLETE do
    Application.ProcessMessages;
  // This is what turns the scrollbars off!
  WB.OleObject.document.body.style.overflowX := 'hidden';
  WB.OleObject.document.body.style.overflowY := 'hidden';
end;

procedure TForm1.sbUPClick(Sender: TObject);
begin
  // scrollup 100 pixels
  WB.OleObject.document.parentWindow.scrollBy(0,-100);
end;

procedure TForm1.sbDNClick(Sender: TObject);
begin
  // scrolldn 100 pixels
  WB.OleObject.document.parentWindow.scrollBy(0,100);
end;

Wes Peterson
Senior Software Engineer
Prestwood IT Solutions
http://www.prestwood.com

 Posted 19 years ago
Comment Quote
About Wes Peterson
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Wes Peterson

Wes Peterson is a Senior Programmer Analyst with Prestwood IT Solutions where he develops custom Windows software and custom websites using .Net and Delphi. When Wes is not coding for clients, he participates in this online community. Prior to his 10-year love-affair with Delphi, he worked with several other tools and databases. Currently he specializes in VS.Net using C# and VB.Net. To Wes, the .NET revolution is as exciting as the birth of Delphi.


Post ID #11952 (Level 1.1)  Reply to 4673
Thread Started 7/3/2007 4:25:59 PM
View Counter=2
Location=Prestwood IT office in Citrus Heights, CA 
Joined=22 years ago   MB Posts=158   KB Posts=163   KB Comments=34   BLOG, Topics=20  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1111A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #4673 Counter
10307
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2026 Prestwood IT Solutions.   [Security & Privacy]  

 
↑