Effects of rigid or adaptive confinement on colloidal self-assembly. Fixed vs. fluctuating number of confined particles.