0

SetUserStylesheet?

Does the SetUserStylesheet brightscript statement alter the "user agent stylesheet"? I'm trying to use it to get rid of scrollbar inside an iframe, but with little success. Looking in the remote chrome debugger, I don't see my style being applied as the "user agent stylesheet" for the element in question.

The doc mentions using "any file: resource in the storage" as well as inline base64 encoded. It doesn't mention whether regular (external) URL is accepted for loading the stylesheet from outside. Is that possible, or can I ONLY use file or inline URLs?

Any other thoughts on how to get rid of scrollbar inside an iframe? Since there's no "mouse" or touch, displaying the scrollbar just looks ugly. And as  it is shown in an iframe where I have no control over the content, I have no easy way to disable it in the CSS.

-JM

6 comments

  • 0
    Avatar
    Russell Sulley

    Do you have control over the code calling the iframe? 

    would be the html way to turn off a scroll bar for iframe

     

    Also ,   normally iframes add scroll bars when the content is overflowing out of the area...

    <iframe src="site.html" width="200" height="200" scrolling="no">
    </iframe>

     

     

  • 0
    Avatar
    Jean Michel

    Yes, I have control of the code OUTSIDE the iframe. However, I've found no way to disable the scrollbar from the outside. I have no control over what goes INTO the iframe. Please let me know if/how I can disable scrollbars INSIDE the iframe from outside the iframe or from brightscript.

    Regardless, I find it strange that the brightscript command for disabling scrollbars doesn't seem to apply inside an iframe. One would think it should apply everywhere, since having scrollbars when no interaction is available is just ugly and useless.

    -JM

  • 0
    Avatar
    Russell Sulley

    I think the issue is because the content is with in an iframe, and generally you cannot use css to modify the content with in an iframe. I'm not 100% sure how Brightsign renders websites, but if you were in a windows environment, say for example google chrome, think of an Iframe as a separate window. But nested with in the page. The page calling the iframe is un-aware of what content is stored in the iframe, and is unable to modify it's contents... iframes are also old coding technique, and hardly any one uses them anymore.

    You might have better luck making your own custome site that links directly to the content being displayed with in the iframe.

  • 0
    Avatar
    Jean Michel

    FYI, I've also tried this ifHtmlWidget BrightScript command:

    EnableScrollbars(scrollbars As Boolean) As Boolean: Enables automatic scrollbars for content that does not fit into the viewport if True. Setting this method to False (the default) disables this feature.

    But it had no effect inside the iframe, which I consider odd.  If I disable scrollbars using this  function, I would assume this would apply to all scrollable content rendered by the HTML Widget. But apparently, this fails for content inside an iframe. I would consider this a bug. Any official comments or thoughts from Brightsign here would be helpful. 
  • 0
    Avatar
    Lyndon

    Can you submit some sample content we can use to see the problem?

  • 0
    Avatar
    Jean Michel

    I'll see if I can provide a link. But the page was nothing special. It just contained an iframe which loaded another page, which was larger than the iframe. This displayed the scrollbar in the iframe, regardless of the EnableScrollbars setting. So I think it should be very straightforward to reproduce. While EnableScrollbars seems to work OK for the main page, it has no effect inside an iframe.

    -JM

Please sign in to leave a comment.