Hide buttons when resizing a box