Remove 2 overlapping widgets

Gave it a go and this theory seems to work quite well in practice:

Feed the consecutive widgets a reference of the one that created it and you can remove them in reverse order using keyboard:


Now that I’m thinking about I think I’ve used something similar before for making draggable stacking windows whose Z ordering was dynamic. A wee bit more tricky as you need to find the one with the highest Z first.

1 Like