auto resize and hide on visibility false