How do I mimic a file explorer window where when selected, its brought to the front using zOrder?

Hey peeps,
So I’m attempting to make an interactive computer system for my project. At the moment I got 3 widgets. 1st is UMG_Desktop. 2nd is UMG_System. 3rd is UMG_Documents. I have 2 buttons in UMG_Desktop. One creates UMG_System and the other UMG_Documents and adds them to viewport. I have the code in so that I can drag and drop the widgets around after they’re created. The problem I’m having is, I want the widget which I’m hovering over and then left click on to be brought forward on the zOrder to mimic it being the top window. Similar to file explorer on windows. Here’s what I have at the moment. I currently get erros with this code which is Accessed None trying to read the SlotAsCanvasSlot. Is anyone able to help me with this please?
Note: 1st picture and 2nd picture code are in UMG_Desktop. 3rd picture code is in UMG_System