set enabled and visible