ID:118783
 
Resolved
Output controls did not recalculate their scrollbars properly after resizing if they had a background image.
BYOND Version:489
Operating System:Windows 7 Pro 64-bit
Web Browser:Chrome 14.0.835.163
Applies to:Dream Seeker
Status: Resolved (493)

This issue has been resolved.
Descriptive Problem Summary:
Using winset to change the size of an output control doesn't change the scrollbar information.

Numbered Steps to Reproduce Problem:
1. Make a project with an output about say 10 lines high
2. Output 8 or 10 lines worth of text
3. winset change the height so only 5 lines or so are visible

Expected Results:
The scrollbar to update properly. Add a scrollbar if lines get cut off. Remove the scrollbar if new lines appear. Change scroll bar so it doesn't think the old amount of lines are still visible.

Actual Results:
Scrollbar information doesn't update.

Does the problem occur:
Every time? Or how often? All the time.
In other games? Yes.
In other user accounts? Yes.
On other computers? Yes.

When does the problem NOT occur?
Never.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Been around awhile.

Workarounds:
Tried many different things, nothing works. Scrollbar information updates fine if the output is anchored and you change the size of the window or something without winset, but using winset doesn't.
The only thing I saw with this was that setting the max-lines property doesn't immediately cutoff old lines, nor am I so sure it should. To keep an open mind on that I'll leave this open, but deferred.

Outputting new text updates the number of lines to fit max-lines, so that's a workaround.
Lummox JR wrote:
The only thing I saw with this was that setting the max-lines property doesn't immediately cutoff old lines, nor am I so sure it should. To keep an open mind on that I'll leave this open, but deferred.
Outputting new text updates the number of lines to fit max-lines, so that's a workaround.

This has to do with changing the output's size variable, not max-lines.

If you have an output that is 200x200 in size, then winset the size to 200x100, scrollbar information doesn't update. The scrollbar still thinks the output is 200x200. So if there wasn't a scrollbar visible yet, but needs a scrollbar because the output is smaller, it wont add one. Same goes for if the output is small, but has a scrollbar already and you increase the size so where it shouldn't have a scrollbar, it still does. And on top of all that, if there already is a scrollbar and the change still needs a scrollbar, there will be a scrollbar, but it wont scroll properly because the sizes are off.

To sum things up, if you change an output's size using winset, the scrollbar doesn't update. The scrollbar visually stretches or whatever, but the internal information doesn't update.
Okay, that's a little clearer to me now. Unfortunately that also means this bug is Unverified, not Deferred, since I am unable to replicate the results.
Lummox JR wrote:
Okay, that's a little clearer to me now. Unfortunately that also means this bug is Unverified, not Deferred, since I am unable to replicate the results.

Make an output that is 200x200, output text into it until a scrollbar appears, then use a command or something that winsets the output size to 200x600. The scrollbar stays and still scrolls, moving the text area.

That is just one example, but hopefully that'll let you see the problem.
Alright. I did some more testing with this and it seems to only happen if you use an image for the output's background.
I'd like to provide more information on this because it's very important (for me) that it gets fixed. Scrollbars on outputs seem to work 100% fine as long as the output does not have a background image. If the output does have a background image, the scrollbar does not update properly when changing the size of the output and has lots of redrawing issues.
Awesome. Thank you. Was getting very annoying.