?
Solved

Hide TWebBrowser ScrollBar

Posted on 2008-06-21
3
Medium Priority
?
1,907 Views
Last Modified: 2013-11-23
The following code works in Delphi-7 fine. But D-2005,2006 & 2007, OleObject.Document property is not available.

WB.OleObject.document.body.style.overflowX := 'hidden';
WB.OleObject.document.body.style.overflowY := 'hidden';

Any solution please.
0
Comment
Question by:SHAHEEN_AKHTAR
[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
3 Comments
 
LVL 26

Accepted Solution

by:
Russell Libby earned 1000 total points
ID: 21858486

I could get the code to run on D5, but it did NOT remove the scrollbars. The best way to handle this is to set the flags in the IDocHostUIHandler.GetHostInfo(...) interface call. Luckily, the EmbeddedWB browser (same IE AX control, better VCL wrapper) already implements this. It can be downloaded from:

http://bsalsa.com/DP/download.php?file=0

If you handle the OnGetHostInfo event you can specify no scrollbars. Eg:

function TForm1.WBGetHostInfo(var pInfo: TDOCHOSTUIINFO): HRESULT;
begin
 
  // No scroll bars
  pinfo.dwFlags:=DOCHOSTUIFLAG_SCROLL_NO;

end;


----

Regards,
Russell
0
 

Author Closing Comment

by:SHAHEEN_AKHTAR
ID: 31469499
I am exploring for other solutions. I success, then I will post it. Thanks for Kind reply. Regards
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Simple Linear Regression
Suggested Courses

800 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