Solved

Hide TWebBrowser ScrollBar

Posted on 2008-06-21
3
1,871 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The purpose of this article is to demonstrate how we can use conditional statements using Python.
A short article about problems I had with the new location API and permissions in Marshmallow
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

920 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