PDA

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



chot2
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 )
http://www.sencha.com/forum/showthread.php?18785-Solved-Window-remove-close-button-from-header

2) closable : false (Dint work )

Can someone please help in suggesting some other ways

Farish
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

chot2
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 ??

Farish
7 Mar 2012, 11:38 PM
try this:


Ext.MessageBox.show(
{
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.

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

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

Try this.It will work for sure :)