How to create a fold effect widget and objs align to it change their positions automatically

I try to simply change the height of a obj widget, but other objs align to it cant change their position automatically.