1

Is there any way to apply a VCL style to TWebBrowser? I would like to change the scrollbars to fit my selected style.

Thank you.

Johan
  • 74,508
  • 24
  • 191
  • 319
Pateman
  • 2,727
  • 3
  • 28
  • 43
  • 1
    As far as I know, you can only disable Windows Themes to classic style using [`DOCHOSTUIFLAG`](http://msdn.microsoft.com/en-us/library/aa753277%28v=vs.85%29.aspx) flag `DOCHOSTUIFLAG_NOTHEME`. If you extend [`this`](http://stackoverflow.com/a/8579489/960757) example and to the `GetHostInfo` method add the code `pInfo.cbSize := SizeOf(TDocHostUIInfo); pInfo.dwFlags := $00080000; Result := S_OK;` you will get classic Windows theme in your web browser control. But I know, that's what you (or anyone else) won't :) +1 here – TLama Dec 20 '11 at 22:53
  • Check this question http://stackoverflow.com/questions/8284003/delphi-xe2-vcl-style-and-webbrowser – RRUZ Apr 25 '12 at 03:54

1 Answers1

1

TWebBrowser is a thin wrapper around the Internet Explorer ActiveX client. All of the UI behavior is controlled by IE, not the VCL. So I don't think you can control the look with VCL styles. You will have to use HTML/CSS styles instead.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • 2
    @RemyLebeau, it's possible apply a vcl style to the scrollbar of a TWebBrowser, check these links http://stackoverflow.com/questions/8284003/delphi-xe2-vcl-style-and-webbrowser http://theroadtodelphi.wordpress.com/2012/03/20/delphi-vcl-styles-and-twebbrowser-source-code-released/ – RRUZ Apr 25 '12 at 03:55