- In Blueprints creating a Scrollbox in a size box. It containing a uniform grid.
- The grid is populated with 9 simple custom widgets all in column 0.
- The blueprint holding all of this listens for DPAD up or DPAD down which decrements and increments a variable used to select one of the 9 custom widgets.
- After up or down is pressed and the index modified, ScrollWidgetIntoView() is called on the newly selected widget
Press down, when the next widget is cut off from the list, will properly scroll to the widget. Pressing up does not scroll.
Pressing up will scroll the selected widget into view in the same way it works when scrolling downward.
- This happens whether called ScrollWidgetIntoView() is called from C++ or Blueprints.
- This happens whether “animation scroll” is true or false.
- This happens whether vertical or horizontal scrolling (and horizontal seems to introduce other issues.)
I have the same result after updating to 4.17. Scroll from top to down direction works perfectly, at up direction do not works. When i try again scroll down scroll not work. I think problem in detection of state of widget(in render zone/ not in render zone)
If this affects you, please vote up for visibility.
Seeing the exact same issue and my head hurts a bit looking at the code. Will have a look tomorrow and hopefully make a patch.
I was able to reproduce this issue on our end. I have written up a report and I have submitted it to the developers for further consideration. I have provided a link to the public tracker. Please feel free to use the link provided for future updates.
Link: Unreal Engine Issues and Bug Tracker (UE-50084)
Make it a great day
Someone at Epic made some unorthodox math, here is a patch.
The file you want to change is
@@ -433,8 +433,9 @@
- const float WidgetStartPosition = GetScrollComponentFromVector(WidgetGeometry->Geometry.Position);
- const float WidgetEndPosition = GetScrollComponentFromVector(WidgetGeometry->Geometry.Position + WidgetGeometry->Geometry.GetLocalSize());
+ const FVector2D WidgetLocalPosition = MyGeometry.AbsoluteToLocal(WidgetGeometry->Geometry.GetAbsolutePosition());
+ const float WidgetStartPosition = GetScrollComponentFromVector(WidgetLocalPosition);
+ const float WidgetEndPosition = GetScrollComponentFromVector(WidgetLocalPosition + WidgetGeometry->Geometry.GetLocalSize());
const float ViewStartPosition = InScrollPadding;
const float ViewEndPosition = GetScrollComponentFromVector(MyGeometry.GetLocalSize() - InScrollPadding);
This is in UNIX patch format: scroll to line 433, remove lines with
- in front, add lines with
Will make a PR on GitHub
Make it a great engine.