x

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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

UMG Verticle box Add child at index

I want to add children to a vertical box at a specific index at runtime. Currently all I can do is "Add child", and it just adds the element at the top of the list.

I looked through the code and found that there is a "ShiftChild" function in c++ that is used in the editor for rearranging widgets. But it's apparently blocked by a #ifdef for use with the editor only. This is the case in 4.8 as well.

How can I do this then? Ideally I'd like to do it in BP, but if there's a way to do it in code I can easily make a BP node or something.

Product Version: UE 4.7
Tags:
more ▼

asked May 17 '15 at 08:56 PM in Blueprint Scripting

avatar image

Constan7ine
138 14 15 27

avatar image IvoryShots Apr 06 '19 at 03:31 PM

Any way to put child on top when i'm using scroll box?

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

2 answers: sort voted first

The only reason that function exists is for the editor is because we completely rebuild the slate widget when the structure changes, so it's safe to restructure it. Not every kind of slate panel understands inserting at runtime.

Personally, I'd probably consider building a different kind of panel. Guessing you're making list of scores or something you're constantly trying to re-sort? I'd probably build some kind of SPriorityBox in slate, where there's some arbitrary priority value the panel sorts by before drawing.

Otherwise, I would suggest making engine modifications to add the function to vertical box. The fields you need to are protected, so just making a C++ function to do it, isn't really an option.

more ▼

answered May 19 '15 at 03:20 PM

avatar image

Nick Darnell ♦♦ STAFF
6k 77 37 151

avatar image gmc Mar 22 '16 at 11:46 PM

Are there any plans to add the ability to re-sort panel children at runtime? (Even if only for a certain panel type) Since I am not good at C++ nor do I know slate, I currently have to delete and re-add panel children to re-organize them at runtime; Ok if it's a small amount of children, but can be bad when there is a lot.

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

2019 still no solution for this.

If it worth something, I solved this problem by firstly ordering my array, not ordering the vbchilds, once my array is ordered, insert it as you wish.

more ▼

answered Mar 30 '19 at 02:46 PM

avatar image

leofucci
166 9 18 24

(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