Button Position

Hey, how can i change the button position in blueprint?
(for example switch the first button with the second)

Like in the editor? Or run time?

Run time. For example if i clicked the second button switch position with the first button.

This is something that UMG is really bad at. There is no exposed functionality in blueprints for this so you need a workaround.

  • place the container children in a temp array
  • switch elements around in the array as you see fit
  • clear the container and repopulate it from the ordered array via a for each loop
  • if you have text that flickers due to auto-formatting, Force Layout Prepass right after adding to a container

For example if i clicked the second
button switch position with the first
button.

For something like this, you’d need to take it further since the buttons do not know what their index is. You’d need to wrap the buttons in a custom widget and have them keep track of the indexes and only then apply the stuff above.