After creation try doing a QueryInterface on the webbrowser interface for
the nsIScrollable interface, e.g.

nsCOMPtr<nsIScrollable> scrollable = do_QueryInterface(mWebBrowser);

Then use the methods of that to turn off scrollbars:

scrollable->SetCurrentScrollbarPreferences(ScrollOrientation_X,
NS_STYLE_OVERFLOW_HIDDEN);
scrollable->SetCurrentScrollbarPreferences(ScrollOrientation_Y,
NS_STYLE_OVERFLOW_HIDDEN);

I don't know if you can call these methods to dynamically turn scrollbars
on/off but they should take effect the next time a scrollable view is
created.

Alfred wrote:

> I am working on a very basic non interactive (remote controlled) browser
> based on the gtk embedding on a red hat linux.
>
> It all works quite fine for me, except that I would really like to get
> rid of the scrollbars when the url displayed is larger than the browser
> window.
>
> Since the browser is non interactive the scrollbars add nothing but eat
> some display space.
>
> Any idea how I could achieve this ?
>
> TIA
> Alfred
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Alfred Flückiger               [EMAIL PROTECTED]
>                        http://www.palmicus.ch
>  "Gloire à qui n'ayant pas d'idéal sacrosaint
>   se borne à ne pas trop emmerder son voisin"
>
> Sent via Deja.com
> http://www.deja.com/

Reply via email to