Mega Code Archive

 
Categories / Delphi / Examples
 

Hide scrollbars in a twebbrowser

Question: How can I hide the scrollbars in my TWebBrowser component? Answer: There are two properties in the Document.Body.Style property, named OverflowX and OverflowX. Simply set them to 'hidden' as shown in the code snippet below. For more information on the TWebBrowser's document properties, see the other tips listed at the top. begin // .. with WebBrowser1.Document.Body.Style do begin OverflowX := 'hidden'; OverflowY := 'hidden'; end; { with WebBrowser1 } // .. end;