ScrollBar before the content on ListViews

I’ve made a pull request to the engine in December with the implementation of the fix (https://github.com/EpicGames/UnrealEngine/pull/14102\) but I was told be people at Epic that I would have more visibility here.

The “fix” adds a drop down menu and let the user chose if the Scrollbar should be before or after the content.

It will break any List/Tile/Tree View that redifine the Slate Arguments.

Note: I also noticed that the TreeView shows all the ListViews option in UMG, but most of the are note propagated to the Slate Widget. It’s due to the fact that the construction helper has a definition of the args that doesn’t inherit from the construction arguments from the ListView.

Steps to Reproduce
There’s not really repro steps to this, The List/Tile/Tree View simply doesn’t support having the Scrollbar before the content (to the left when vertical and on top when horizontal). The work around has always been to flip the list and flip the content, but it didn’t work in our specific case.

Hi,

This is something that we see requests for pretty often, though there were a few callouts on the pull request. Those should have propagated to Github as a comment but some of our automation might be broken at the moment, so I’ll share here:

  • There are unneeded changes regarding `ScrollBarPadding`, including exposing the `ScrollBarPadding` member variable in ListView.h when a Getter Function exists.
  • It would be nice to templatize the Construction of the Content and ScrollBar using SVerticalBox and SHorizontalBox as template parameters, so that if any layout changes need to be made, it only needs to be made in one spot, rather than two.

If you want to make some updates and resubmit, let us know here and I’ll make sure it gets in front of the team for review.

Thanks,

Cody

I’ve updated the pull request. I couldn’t templatize the functions because there are function call specific to each type slots (.FillWidth(1) vs .FillHeight(1) and .AutoWidth() vs .AutoHeight()). However, I did remove the fix for the ScrollBarPadding from the pull request.

I’ve spent a little more time on it and I manage to get the method templated.

Perfect, I’ve reopened the ticket internally so that we can review the change again. Thanks!

Great! I’ll let the reviewer know that there’s an update, we’ll respond via Github once it’s been reviewed.