# multiple umg widgets - how to disable control of parent?

**URL:** <https://forums.unrealengine.com/t/multiple-umg-widgets-how-to-disable-control-of-parent/479498>\
**Category:** UI\
**Tags:** remove-from-parent, child-actors, unreal-engine, multiple-instance, Widget, question\
**Created:** [February 27, 2021, 12:58am UTC](https://forums.unrealengine.com/t/multiple-umg-widgets-how-to-disable-control-of-parent/479498 "2021-02-27T00:58:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flame](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Flame](https://forums.unrealengine.com/u/Flame)\
**Post date:** [February 27, 2021, 12:58am UTC](https://forums.unrealengine.com/t/multiple-umg-widgets-how-to-disable-control-of-parent/479498/1 "2021-02-27T00:58:57Z")

</div>

hi  
so i have created a list of objects as buttons, then when i click on one of them, it creates a new widget based on that button. Problem is, the one in the background(the parent) is still clickable.  
How can i remove the ability to click on the parent while the child is active?(and then return the power to the parent once i close the child)

thank you

---

<div class="post-metadata">

**Author:** ![L1z4rD89](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/l1z4rd89/32/1194537_2.png) [@L1z4rD89](https://forums.unrealengine.com/u/L1z4rD89)\
**Post date:** [February 27, 2021, 3:13am UTC](https://forums.unrealengine.com/t/multiple-umg-widgets-how-to-disable-control-of-parent/479498/2 "2021-02-27T03:13:19Z")

</div>

Let’s say you create your widget in the **ThirdPersonCharacter**. This would work with **CreateWidget** and then **AddToViewport**. In this **AddToViewport** node there is an option called **ZOrder**. By changing this order you can set which widget lays on top of the other and therefore is the one you want to be clickable. Another solution would be that when you add your new widget you set your old/parent widget to disabled by changing its **IsEnabled** status. Or you use a **WidgetSwitcher**. Example:

I have 3 seperate widgets:

1. Main Menu
2. Options
3. Controls

![331037-widgets.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/f/d9f453d654a03dd4f6a3a8c5d44b30d1aae89510.jpeg)

The problem: They are seperate. How can I put them together and keep their functions. Solution: I create a new Widget called **MenuSwitch\_W**. So now I have 4 sperate widgets. In my **MenuSwitch\_W** I create a **WidgetSwitcher** panel and scale it to the size of my widget. Now I add my seperate widgets 1,2 and 3 to this **WidgetSwitcher** in the **Designer** from **UserCreated** on the left side. The order in which they appear as childs of my **WidgetSwitcher** shows their index (I renamed them with 0,1 and 2 to make it clearer).

 ![331038-widgetswitcher.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/d/5/9d5b74b57853081bb9b058df035d96c154c1f757.jpeg)

But how can I access the functions of my widget switcher? In every widget I added (not in the MenuSwitch\_W) I add a **EventConstruct** like this:

 ![331039-eventconstruct.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/4/5/245433b8aa7a81f5dc3ddf10715cfbc041615ec1.jpeg)

So now I have a reference to my **MenuSwitch\_W**. With this reference I can now set the index of my **WidgetSwitcher** in **MenuSwitch\_W** using the buttons I create in those seperate widgets. In my **MainMenu\_W** I have two buttons(as you can see in the picture above): **Options** and **Controls**. The **EventGraph** for my seperate **MainMenu\_W** looks now like this:

 ![331040-mainmenu.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/3/c/e3c139feeef4f92a792ac8ec995605b440a02201.jpeg)

Those buttons change the index to 1 or 2 and tell the **WidgetSwitcher** to use this index and show the correct widget. In the other two widgets I have only a Back button which changes the index to 0 ( **MainMenu\_W** ).

---

<div class="post-metadata">

**Author:** ![Flame](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Flame](https://forums.unrealengine.com/u/Flame)\
**Post date:** [February 27, 2021, 3:51am UTC](https://forums.unrealengine.com/t/multiple-umg-widgets-how-to-disable-control-of-parent/479498/3 "2021-02-27T03:51:05Z")

</div>

thank you so much !
