@JonasH: the idea is to have a complete set of controls on a tabpage and hide certain ones, if needed. The resulting gaps should be closed by moving the remaining (visible) controls up. A solution found on the internet proposed to remove the controls instead of hiding them.
However, adding and removing them dynamically seems no problem. I imagine this to be the same like hide/unhide, but you need a reference. The approach with the tag was an alternative because reading the control's name/type that was removed recently didn't work well.