sujal
sujal

Reputation: 1050

How to control height of Message Box in ExtJS

Ext.Msg.show({  
   title:"My Title",
   msg:"Are you Sure?",                                     
   minHeight:20,
   modal:true,  
   icon:Ext.window.MessageBox.INFO, 
   buttons:Ext.MessageBox.OK
});

Here is my code for message box.

Do anyone have any idea how to control its height? I don't want unwanted spaces between "Are you Sure" text and ok button.


Tried height:20 but its no use..

Upvotes: 0

Views: 4490

Answers (3)

Aamir Jamal
Aamir Jamal

Reputation: 865

The accepted answer does not work for ExtJs 4.1

I had to do this for it to work fine for me :

Ext.Msg.show({  
title:"My Title",
msg:"Are you Sure?",
icon:Ext.window.MessageBox.INFO, 
buttons:Ext.MessageBox.OK
}).setHeight(50);

You can also use the setSize() method instead for setting height and width.

Upvotes: 1

sujal
sujal

Reputation: 1050

Ok, i have found its solution..i have just define maxHeight and it works like a charm.

Upvotes: 1

Hariharan
Hariharan

Reputation: 3263

use cls and apply css padding and achieve your goal. to refer the css class, use firebug(FF) and developer tool(IE).

css on message box

Thanks

Upvotes: 0

Related Questions