# Change Z-Order in Viewport

**URL:** <https://forums.unrealengine.com/t/change-z-order-in-viewport/332901>\
**Category:** UI\
**Tags:** order, unreal-engine, Widget, question, Blueprint\
**Created:** [September 21, 2015, 3:49am UTC](https://forums.unrealengine.com/t/change-z-order-in-viewport/332901 "2015-09-21T03:49:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MuzzyA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MuzzyA](https://forums.unrealengine.com/u/MuzzyA)\
**Post date:** [September 21, 2015, 3:49am UTC](https://forums.unrealengine.com/t/change-z-order-in-viewport/332901/1 "2015-09-21T03:49:42Z")

</div>

I’m making a feature request for having the ability to change the Z-Order of widgets in the VIEWPORT at runtime. This seems like a simple feature to add. If there are any ways I can set this up in the meantime I would love to know how. I looked in C++ and it seems like I would have to do a lot of hacking to get it done.

In blueprints, you can’t just Remove From Parent, and then call Add to Viewport again. I suppose it puts it in a pending list when you call Remove From Parent.

The effect I want is to be able to control Z-Order of windows in game in the same way that any Operating System does. You click a window, it comes to the front.

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [October 18, 2022, 6:54pm UTC](https://forums.unrealengine.com/t/change-z-order-in-viewport/332901/2 "2022-10-18T18:54:23Z")

</div>

Hello. There are several existing UI layers and several methods to add a widget. This can help a little bit [UE4Cookery CPP007: How to add a widget?](https://www.gamedeveloper.com/programming/ue4cookery-cpp007-how-to-add-a-widget-)
