how to show read only prompt dialog extjs

i want to show ready only textfield in Extjs prompt dialog
READY_ONLY EXTJS PROMPT DIALOG

Submitted by John On Monday, 26 May 2014.
Category: Extjs

[RESOLVED]

1
1 Answers.
 
Super User
laser

Re:how to show read only prompt dialog extjs

Ext.Msg.prompt('Title', 'Copy the id', function(btn){ 
            //dont remove this line, other wise next call to prompt will show readonly text box even you are not calling "Ext.Msg.textField.setReadOnly(true);" 
            Ext.Msg.textField.setReadOnly(false); 
 }, this, false, '123456'); 
Ext.Msg.textField.setReadOnly(true); // make textfield readonly 
Ext.Msg.textField.selectText();//call this if you want to pre-selected text in the box
Submitted by Super User On Monday, 26 May 2014
0
This Answer has been Chosen as Best Answer
Question is marked as resolved.