ID:139490
 
Code:
winset(src,"BrowseWindow","can-scroll=none")
winset(src,"Browser","is-visible=true;border=none;titlebar=false;can-close=false;right-click=false")

// and

winset(src,"BrowseWindow","can-scroll=vertical")
winset(src,"Browser","is-visible=true;border=none;title=\"Who\";right-click=false")


Problem description:

"BrowseWindow" is a Browser element
"Browser" is the main window

"can-scroll" is a parameter of Windows, and can be set to "none","vertical","horizontal" or both.

The "BrowseWindow" is NOT a Pane.

Now, for the problem:

I'm using the BrowseWindow for 2 utilities,
whenever I execute whichever code from up there, I have no scroll-bars. Upon closing and re-opening the window, I get vertical ones.

HOWEVER, if I open the BrowseWindow using code-snippet A, close it, then open it using code-snippet B, I never see scroll-bars, regardless whether can-scroll is set to "vertical" or "none".

Now this isn't huge, but could be a bug and is hugely pissing me off. Am I doing something wrong?



Why does the BrowseWindow need a scrollbar if it contains a browser?
In response to Vermolius
When looked up in the reference, the Browser element doesn't contain a can-scroll parameter, only a Main Window.

Also, none of the text displayed inside the Browser exceeds the visual limit, so it has no reason to automatically add a scrollbar.
In response to Emasym
I'm just saying that the browser will have its own scrollbars for you to deal with. If the browser control isn't larger than the window then you need to be dealing with the browser's scrollbars not the scrollbars on the window.
In response to Vermolius
Well, I'm constantly tinkering, and even when setting the size of BrowseWindow and Browser the same at run-time, the problem keeps occuring.

No scrollbar upon first opening window, vertical scrollbar upon opening it again right after
In response to Emasym
I've actually been having the same issue with one of my projects.

I have a window named game that has 3 child controls, header, navbar, and main. The default top/left for game.main is a pane called welcome which contains some labels, a big browser control, and an output.

The browser does not need a scrollbar, everything fits.

If I click a button on game.navbar that changes the top/left for game.main to something else, and then back to welcome, a vertical scrollbar appears on the browser window.

Sounds like a BYOND bug to me.
In response to Emasym
I did some tinkering with Zag's version of this and found that if you set the CSS property overflow for your HTML content's body tag to auto that the scrollbar issue is fixed.

// For example
<html>
<body style="overflow:auto;>
<!-- rest of your html here -->
In response to Vermolius
Excellent Vermolius, that fixed the problem completely!

Cheerios!