Solved

Hide TWebBrowser ScrollBar

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A short article about a problem I had getting the GPS LocationListener working.
This is about my first experience with programming Arduino.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

839 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