Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

UMG - Vertical/ScrollBox set child index

I'm trying to set the priority of a scrollbox that has some widget children.

Right now i want the new widget child to be at the top of the list, instead of the bottom, but I have no way of reversing the order of the scrollbox. I can't also set the "order" (index) I want to add the child to. Is there any function/panel I can use that let's me organize it's children?

Product Version: UE 4.10
more ▼

asked Jan 19 '16 at 05:24 PM in Blueprint Scripting

avatar image

96 5 9 16

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Did you ever find a solution? I would like to know too.

EDIT: At the moment I clear the box from all children after the point where I want to add the specific child. And then I recreate the children I had to delete. Given that widgets cannot be destroyed during a level, with this workaround I get quite an enormous number of unnecessary objects stacking in memory.

I would really like to be able to organize children via indexes in blueprint, exactly like you can do inside the editor with the arrows or dragging, or in c++.

more ▼

answered May 01 '16 at 07:43 PM

avatar image

234 24 20 28

avatar image Esteves May 01 '16 at 07:59 PM

Unfortunately no, never quite fixed this issue. Let me know if you happen to figure it out. I guess the only way atm I can think of is to have a function that removes and stores all the previous widgets adds the new one and then the saved ones but I ended up not using this in my game and just inverted the menu :-(

avatar image ClaudioPiccinni May 01 '16 at 07:59 PM

Yes while you were writing I updated the original comment with this exact workaround...

avatar image Esteves May 01 '16 at 08:03 PM

oh, sorry I didn't saw you changed your comment, but yea, I think "our" solution is the only one that I at least can think of, and I scrapped it exactly because it's much more memory and processing consuming. Should definitely be a better way to do this, just an option in the widget that says where the children are added to would be enough

avatar image ClaudioPiccinni May 01 '16 at 08:10 PM

Well for my case I need to rearrange the order at runtime so I would need also the ability to set the index too.

I'm fairly sure you can do this via c++, and that it's just a problem with the function not ported to blueprints. :(

avatar image Esteves May 01 '16 at 08:13 PM

If you find the c++ code that allows to set the index let me know I may just do a custom node for it. I'll look for it too

avatar image ClaudioPiccinni May 01 '16 at 08:36 PM

To be honest I haven't actually looked.
I just guessed since you can do it from the editor using the arrows that appear when you select a child. It might be something only available in the umg editor though because I'm not finding anything. :(

avatar image illyavangils May 23 '16 at 11:41 AM

clearing the children and adding them again would likely work fine if instead of forgetting about them and recreating them you stored them in an array of widgets, adding them again based on the array you have, means any time you want to change the order you need to sort the array but you wouldn't use a huge amount of memory as a result

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hello - it has been a while since you posted this, so I do not know if your problem has been solved. The C++ function that you are looking for is the UScrollBox::InsertChildAt function, which allows you to specify where you want it added.

more ▼

answered Jun 03 '17 at 11:50 AM

avatar image

Sir Rogers
6 2 4 8

avatar image ellocator Aug 04 '17 at 10:02 AM

That function unfortunately does not work correctly. Documentation says:

This does not update the live slate version, it requires a rebuild of the whole UI to see a change.


It is currently unknown how to "rebuild of the whole UI".

Calling RebuildWidget and SynchronizeProperties on "this", "the panel" and all the slots does nothing.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question