I have a panel(dropAreaHolder) which has a scrollable panel(dropArea) as a child. In my game I instantiate game objects by drag and drops and put them inside my scrollable panel (dropArea) (just like the idea in Scratch, cloning code blocks and putting them in a coding area). My coding area can only show about 20 code blocks. When the number of code blocks is larger than 20, then my scrollbar will become visible and player can scroll and see everything. When the number of code blocks become 20 or less, scrollbar is hidden again and scroll rect component is disabled. Up to this point everything works just perfect. But the problem is that when i remove lets say the first code block, the code blocks do not re-arrange themselves so i can’t see all 20 code blocks, the last one always remains at the bottom - out of the masked area.
It looks something like that: