Option to hide close button

I needed to force the user to leave the view only by clicking a button that was added. This couldn't be done if the close button was added. 

The option must be set before the open method.