View Full Version : How to remove close button from a confirm box

2 Mar 2012, 1:56 AM
I want to remove the close button from a confirm box , I have tried the following two ways but none of them worked

1) win.tools.close.setStyle({display:"none"});

(Dint know where to apply this )

2) closable : false (Dint work )

Can someone please help in suggesting some other ways

2 Mar 2012, 2:51 AM
why dont you use alert instead if you dont want the close button? closable only enables closing the window by pressing escape or clicking on the "X" on the top right corner. You could set the hidden config to true for that button if you can access it.

hidden: true

7 Mar 2012, 9:22 PM
Alert would be having only 1 'ok ' button . Insted I need a box with yes no buttons like confirm box . Is theere any other way to remove close button other than this ??

7 Mar 2012, 11:38 PM
try this:

title: 'Interface Exception',
msg: "Session Expired!",
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK,
closable: false

this works for me and doesnt have an "X" button with which the window can be closed. you have to set up buttons to show the 2 buttons that you want.

8 Mar 2012, 9:36 AM
thanks Farish . I found it

26 Jul 2013, 7:06 AM
closable: false.

Try this.It will work for sure :)