Scroll to bottom (Multi-Text Box)

Alright so I’m making a console in my game primarily for dev use. at this time I have it mostly working… The only issue at this point is that its not auto scrolling. Its kinda of a pain as you have to constantly scroll down to see any errors/ status updates passing to it. I found a scroll to end function for scroll boxes but I’m wondering if anyone has figured out a way for the multi line text boxes to be engine scrolled. Threw blueprints preferably.

If something like this should be done threw scroll boxes I could look in to that as well.

so temporarily I’ve just got the console adding things to the top line rather than the bottom but if no one has any ideas this should probably be a feature request :stuck_out_tongue:

I have the same question, you can wrap the text box in a scroll box and use the “Scroll to Bottom” function to repeatedly scroll to the end every tick, but then it’s impossible to scroll up since the scroll box auto-scrolls every frame regardless of where you’re trying to drag the scroll bar.

I had an idea of how to solve this issue, but it’s terribly inefficient. Have two identical scroll boxes with identical text boxes within each, but make one completely invisible in your user interface. Every time you print something to the visible one, print the same thing to the invisible one too. Immediately before anything is written to either box, scroll the invisible scroll box to the bottom, and check to see if the scroll offset of the two scroll boxes are the same. If they are, you know your visible scroll box is scrolled down to the bottom already, so you should scroll to the bottom again after you print the next message. This method requires you to essentially double the resources require to maintain your scroll box. I don’t know how much hidden UI elements affect performance, but I’ve seen that single consoles like this can halve your frame rate once they have about 2-3 thousand messages printed to them.

The ideal method would be to have a “Get Scroll Offset as Ratio” function that returns a float between 0.0 and 1.0 that represents the current scroll offset as a portion of it’s total offset. This would allow us to simply say “if (scroll offset ratio == 1) {print next message; scroll to bottom again;}”. I’m considering actually learning how to contribute to the UE4 repository just to add in this functionality.

Update: Hiding a text box appears to do nothing to ease the hit on your framerate.

I love the idea of a “Get Scroll Offset as Ratio” function, please add it!!!

Was this offset ratio ever added? I need to know when the user reaches the bottom of a scrollbox