Resize Frame when open or close