add ability to show or hide the close button.