Solved

Hide TWebBrowser ScrollBar

Posted on 2008-06-21
3
1,864 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
3 Comments
 
LVL 26

Accepted Solution

by:
Russell Libby earned 250 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

708 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

13 Experts available now in Live!

Get 1:1 Help Now