Constructing dynamic scrollable buttons list based on array of saved checkboxes.

Hello. I creating dynamic audio player using Blueprint. Need help in final part of this task. So far I created following:

  1. List of buttons whit checkboxes (I have 2 widgets one for the scrollbox and second for child buttons with checkboxes.
  2. I created logic for checking buttons and saving states in an separate Boolean Array.
  3. Created logic for loading button checkboxes state.
  4. I created 2 new widget templates for displaying checked user result. New logic to store selected data in separate array and displaying results. All data stored in new array under it previous id using set array elem.

The final problem is when I load new array of data it also load empty id from this array. Except of empty buttons everything working well. Even cheeked Id States on a new widget on proper position. Only problem is to find solution how handle empty buttons.


  1. I think the better way is to modify foreachloopwhitbreak and create logic to construct only selected checkboxes.
  2. Maybe it passable to get unchecked state of checkboxes from Boolean array and deleted unnecessary child buttons.
    What will be the better approach in my case. Perhaps someone worked on the similar task and have a solution. Thanks!!!

I would have bit different setup. I did similar thing for my server browser.

Make custom widget that handles single line of your list. It needs to connect (hook) to data structure that holds information about media files. For eg i hold all data in game_mode blueprint in array of structs. Game mode blueprint because it is easy to find reference, is created early after loading map etc. Each widget hooks to dispatcher that is triggered by game mode blueprint every time i need to change list. Also each widget remembers which index of array it handles, and checks only against that array element. So every time i change list of found servers i call dispatcher, then all widgets automatically update and copy single cell (one they need to handle) from array in game_mode. Then in those widgets update event i read data from that copied cell and manage widget.

When i have that single line widget ready i just make dynamic list of such widgets in some “parent” widget in my cast it was browser list.

Remember you cannot destroy widgets, so better way is to create as many as you need for list, then collapse ones that are not needed. In my case if line widget detects that it should handle array element that is greater than max index it collapses self. Also parent widget on update checks if it created enough child widgets to hold whole array. For mobile game you could create only as many widgets as maximum visible number, then adjust index of data array they should handle.

Very interesting approach. I will try to think about it. Thanks for the quick response.

Today I removed the empty button but found another problems. There are problems with sound reproduction using the id. And set array does not allow checkboxes order of my choice.