Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / docs / output / Ext.MessageBox.html
1 <div xmlns:ext="http://www.extjs.com" class="body-wrap"><h1>Class <a href="source/MessageBox.html#cls-Ext.MessageBox">Ext.MessageBox</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">MessageBox.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/MessageBox.html#cls-Ext.MessageBox">MessageBox</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description"><p>Utility class for generating different styles of message boxes.  The alias Ext.Msg can also be used.<p/>\r
2 <p>Note that the MessageBox is asynchronous.  Unlike a regular JavaScript <code>alert</code> (which will halt\r
3 browser execution), showing a MessageBox will not cause the code to stop.  For this reason, if you have code\r
4 that should only run <em>after</em> some user feedback from the MessageBox, you must use a callback function\r
5 (see the <code><b>function</b></code> parameter for <a href="output/Ext.MessageBox.html#Ext.MessageBox-show" ext:member="show" ext:cls="Ext.MessageBox">show</a> for more details).</p>\r
6 <p>Example usage:</p>\r
7 <pre><code><i>// Basic alert:\r</i>
8 Ext.Msg.alert(<em>'Status'</em>, <em>'Changes saved successfully.'</em>);\r
9 \r
10 <i>// Prompt <b>for</b> user data and process the result using a callback:\r</i>
11 Ext.Msg.prompt(<em>'Name'</em>, <em>'Please enter your name:'</em>, <b>function</b>(btn, text){\r
12     <b>if</b> (btn == <em>'ok'</em>){\r
13         <i>// process text value and close...\r</i>
14     }\r
15 });\r
16 \r
17 <i>// Show a dialog using config options:\r</i>
18 Ext.Msg.show({\r
19    title:<em>'Save Changes?'</em>,\r
20    msg: <em>'You are closing a tab that has unsaved changes. Would you like to save your changes?'</em>,\r
21    buttons: Ext.Msg.YESNOCANCEL,\r
22    fn: processResult,\r
23    animEl: <em>'elId'</em>,\r
24    icon: Ext.MessageBox.QUESTION\r
25 });</code></pre><br><br><i>This class is a singleton and cannot be created directly.</i></div><div class="hr"></div><a id="Ext.MessageBox-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-CANCEL"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-CANCEL">CANCEL</a></b> : Object<div class="mdesc">Button config that displays a single Cancel button</div></td><td class="msource">MessageBox</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-ERROR"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-ERROR">ERROR</a></b> : String<div class="mdesc">The CSS class that provides the ERROR icon image</div></td><td class="msource">MessageBox</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-INFO"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-INFO">INFO</a></b> : String<div class="mdesc">The CSS class that provides the INFO icon image</div></td><td class="msource">MessageBox</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-Msg"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-Msg">Msg</a></b> : Object<div class="mdesc">Shorthand for <a href="output/Ext.MessageBox.html" ext:cls="Ext.MessageBox">Ext.MessageBox</a></div></td><td class="msource">MessageBox</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-OK"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-OK">OK</a></b> : Object<div class="mdesc">Button config that displays a single OK button</div></td><td class="msource">MessageBox</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-OKCANCEL"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-OKCANCEL">OKCANCEL</a></b> : Object<div class="mdesc">Button config that displays OK and Cancel buttons</div></td><td class="msource">MessageBox</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-QUESTION"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-QUESTION">QUESTION</a></b> : String<div class="mdesc">The CSS class that provides the QUESTION icon image</div></td><td class="msource">MessageBox</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-WARNING"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-WARNING">WARNING</a></b> : String<div class="mdesc">The CSS class that provides the WARNING icon image</div></td><td class="msource">MessageBox</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-YESNO"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-YESNO">YESNO</a></b> : Object<div class="mdesc">Button config that displays Yes and No buttons</div></td><td class="msource">MessageBox</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-YESNOCANCEL"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-YESNOCANCEL">YESNOCANCEL</a></b> : Object<div class="mdesc">Button config that displays Yes, No and Cancel buttons</div></td><td class="msource">MessageBox</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-buttonText"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-buttonText">buttonText</a></b> : Object<div class="mdesc"><div class="short">An object containing the default button text strings that can be overriden for localized language support.&#13;\r
26 Supported...</div><div class="long">An object containing the default button text strings that can be overriden for localized language support.\r
27 Supported properties are: ok, cancel, yes and no.  Generally you should include a locale-specific\r
28 resource file for handling language support across the framework.\r
29 Customize the default text like so: Ext.MessageBox.buttonText.yes = "oui"; //french</div></div></td><td class="msource">MessageBox</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-defaultTextHeight"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-defaultTextHeight">defaultTextHeight</a></b> : Number<div class="mdesc">The default height in pixels of the message box's multiline textarea if displayed (defaults to 75)</div></td><td class="msource">MessageBox</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-maxWidth"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-maxWidth">maxWidth</a></b> : Number<div class="mdesc">The maximum width in pixels of the message box (defaults to 600)</div></td><td class="msource">MessageBox</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-minProgressWidth"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-minProgressWidth">minProgressWidth</a></b> : Number<div class="mdesc"><div class="short">The minimum width in pixels of the message box if it is a progress-style dialog.  This is useful&#13;\r
30 for setting a diffe...</div><div class="long">The minimum width in pixels of the message box if it is a progress-style dialog.  This is useful\r
31 for setting a different minimum width than text-only dialogs may need (defaults to 250)</div></div></td><td class="msource">MessageBox</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-minWidth"></a><b><a href="source/MessageBox.html#prop-Ext.MessageBox-minWidth">minWidth</a></b> : Number<div class="mdesc">The minimum width in pixels of the message box (defaults to 100)</div></td><td class="msource">MessageBox</td></tr></tbody></table><a id="Ext.MessageBox-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-alert"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-alert">alert</a></b>(&nbsp;<code>String&nbsp;title</code>,&nbsp;<code>String&nbsp;msg</code>,&nbsp;<span title="Optional" class="optional">[<code>Function&nbsp;fn</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;scope</code>]</span>&nbsp;)\r
32     :\r
33                                         Ext.MessageBox<div class="mdesc"><div class="short">Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).&#13;\r
34 If a ...</div><div class="long">Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt).\r
35 If a callback function is passed it will be called after the user clicks the button, and the\r
36 id of the button that was clicked will be passed as the only parameter to the callback\r
37 (could also be the top-right close button).<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) The callback function invoked after the message box is closed</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<code>this</code> reference) in which the callback is executed. Defaults to the browser wnidow.</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-confirm"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-confirm">confirm</a></b>(&nbsp;<code>String&nbsp;title</code>,&nbsp;<code>String&nbsp;msg</code>,&nbsp;<span title="Optional" class="optional">[<code>Function&nbsp;fn</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;scope</code>]</span>&nbsp;)\r
38     :\r
39                                         Ext.MessageBox<div class="mdesc"><div class="short">Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).&#13;\r
40 If a callback func...</div><div class="long">Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm).\r
41 If a callback function is passed it will be called after the user clicks either button,\r
42 and the id of the button that was clicked will be passed as the only parameter to the callback\r
43 (could also be the top-right close button).<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) The callback function invoked after the message box is closed</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<code>this</code> reference) in which the callback is executed. Defaults to the browser wnidow.</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-getDialog"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-getDialog">getDialog</a></b>()\r
44     :\r
45                                         Ext.Window<div class="mdesc"><div class="short">Returns a reference to the underlying Ext.Window element</div><div class="long">Returns a reference to the underlying <a href="output/Ext.Window.html" ext:cls="Ext.Window">Ext.Window</a> element<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Ext.Window</code><div class="sub-desc">The window</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-hide"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-hide">hide</a></b>()\r
46     :\r
47                                         Ext.MessageBox<div class="mdesc"><div class="short">Hides the message box if it is displayed</div><div class="long">Hides the message box if it is displayed<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-isVisible"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-isVisible">isVisible</a></b>()\r
48     :\r
49                                         Boolean<div class="mdesc"><div class="short">Returns true if the message box is currently displayed</div><div class="long">Returns true if the message box is currently displayed<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Boolean</code><div class="sub-desc">True if the message box is visible, else false</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-progress"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-progress">progress</a></b>(&nbsp;<code>String&nbsp;title</code>,&nbsp;<code>String&nbsp;msg</code>,&nbsp;<span title="Optional" class="optional">[<code>String&nbsp;progressText</code>]</span>&nbsp;)\r
50     :\r
51                                         Ext.MessageBox<div class="mdesc"><div class="short">Displays a message box with a progress bar.  This message box has no buttons and is not closeable by&#13;\r
52 the user.  You ...</div><div class="long">Displays a message box with a progress bar.  This message box has no buttons and is not closeable by\r
53 the user.  You are responsible for updating the progress bar as needed via <a href="output/Ext.MessageBox.html#Ext.MessageBox-updateProgress" ext:member="updateProgress" ext:cls="Ext.MessageBox">Ext.MessageBox.updateProgress</a>\r
54 and closing the message box when the process is complete.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>progressText</code> : String<div class="sub-desc">(optional) The text to display inside the progress bar (defaults to '')</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-prompt"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-prompt">prompt</a></b>(&nbsp;<code>String&nbsp;title</code>,&nbsp;<code>String&nbsp;msg</code>,&nbsp;<span title="Optional" class="optional">[<code>Function&nbsp;fn</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;scope</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Boolean/Number&nbsp;multiline</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>String&nbsp;value</code>]</span>&nbsp;)\r
55     :\r
56                                         Ext.MessageBox<div class="mdesc"><div class="short">Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's p...</div><div class="long">Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt).\r
57 The prompt can be a single-line or multi-line textbox.  If a callback function is passed it will be called after the user\r
58 clicks either button, and the id of the button that was clicked (could also be the top-right\r
59 close button) and the text that was entered will be passed as the two parameters to the callback.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>title</code> : String<div class="sub-desc">The title bar text</div></li><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) The callback function invoked after the message box is closed</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<code>this</code> reference) in which the callback is executed. Defaults to the browser wnidow.</div></li><li><code>multiline</code> : Boolean/Number<div class="sub-desc">(optional) True to create a multiline textbox using the defaultTextHeight\r
60 property, or the height in pixels to create the textbox (defaults to false / single-line)</div></li><li><code>value</code> : String<div class="sub-desc">(optional) Default value of the text input element (defaults to '')</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-setIcon"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-setIcon">setIcon</a></b>(&nbsp;<code>String&nbsp;icon</code>&nbsp;)\r
61     :\r
62                                         Ext.MessageBox<div class="mdesc"><div class="short">Adds the specified icon to the dialog.  By default, the class 'ext-mb-icon' is applied for default&#13;\r
63 styling, and the ...</div><div class="long">Adds the specified icon to the dialog.  By default, the class 'ext-mb-icon' is applied for default\r
64 styling, and the class passed in is expected to supply the background image url. Pass in empty string ('')\r
65 to clear any existing icon. This method must be called before the MessageBox is shown.\r
66 The following built-in icon classes are supported, but you can also pass in a custom class name:\r
67 <pre>\r
68 Ext.MessageBox.INFO\r
69 Ext.MessageBox.WARNING\r
70 Ext.MessageBox.QUESTION\r
71 Ext.MessageBox.ERROR\r
72 </pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>icon</code> : String<div class="sub-desc">A CSS classname specifying the icon's background image url, or empty string to clear the icon</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-show"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-show">show</a></b>(&nbsp;<code>Object&nbsp;config</code>&nbsp;)\r
73     :\r
74                                         Ext.MessageBox<div class="mdesc"><div class="short">Displays a new message box, or reinitializes an existing message box, based on the config options&#13;\r
75 passed in. All dis...</div><div class="long">Displays a new message box, or reinitializes an existing message box, based on the config options\r
76 passed in. All display functions (e.g. prompt, alert, etc.) on MessageBox call this function internally,\r
77 although those calls are basic shortcuts and do not support all of the config options allowed here.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>config</code> : Object<div class="sub-desc">The following config options are supported: <ul>\r
78 <li><b>animEl</b> : String/Element<div class="sub-desc">An id or Element from which the message box should animate as it\r
79 opens and closes (defaults to undefined)</div></li>\r
80 <li><b>buttons</b> : Object/Boolean<div class="sub-desc">A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo',\r
81 cancel:'Bar'}), or false to not show any buttons (defaults to false)</div></li>\r
82 <li><b>closable</b> : Boolean<div class="sub-desc">False to hide the top-right close button (defaults to true). Note that\r
83 progress and wait dialogs will ignore this property and always hide the close button as they can only\r
84 be closed programmatically.</div></li>\r
85 <li><b>cls</b> : String<div class="sub-desc">A custom CSS class to apply to the message box's container element</div></li>\r
86 <li><b>defaultTextHeight</b> : Number<div class="sub-desc">The default height in pixels of the message box's multiline textarea\r
87 if displayed (defaults to 75)</div></li>\r
88 <li><b>fn</b> : Function<div class="sub-desc">A callback function which is called when the dialog is dismissed either\r
89 by clicking on the configured buttons, or on the dialog close button, or by pressing\r
90 the return button to enter input.\r
91 <p>Progress and wait dialogs will ignore this option since they do not respond to user\r
92 actions and can only be closed programmatically, so any required function should be called\r
93 by the same code after it closes the dialog. Parameters passed:<ul>\r
94 <li><b>buttonId</b> : String<div class="sub-desc">The ID of the button pressed, one of:<div class="sub-desc"><ul>\r
95 <li><tt>ok</tt></li>\r
96 <li><tt>yes</tt></li>\r
97 <li><tt>no</tt></li>\r
98 <li><tt>cancel</tt></li>\r
99 </ul></div></div></li>\r
100 <li><b>text</b> : String<div class="sub-desc">Value of the input field if either <tt><a href="#show-option-prompt" ext:member="show-option-prompt" ext:cls="Ext.MessageBox">prompt</a></tt>\r
101 or <tt><a href="#show-option-multiline" ext:member="show-option-multiline" ext:cls="Ext.MessageBox">multiline</a></tt> is true</div></li>\r
102 <li><b>opt</b> : Object<div class="sub-desc">The config object passed to show.</div></li>\r
103 </ul></p></div></li>\r
104 <li><b>scope</b> : Object<div class="sub-desc">The scope of the callback function</div></li>\r
105 <li><b>icon</b> : String<div class="sub-desc">A CSS class that provides a background image to be used as the body icon for the\r
106 dialog (e.g. Ext.MessageBox.WARNING or 'custom-class') (defaults to '')</div></li>\r
107 <li><b>iconCls</b> : String<div class="sub-desc">The standard <a href="output/Ext.Window.html#Ext.Window-iconCls" ext:member="iconCls" ext:cls="Ext.Window">Ext.Window.iconCls</a> to\r
108 add an optional header icon (defaults to '')</div></li>\r
109 <li><b>maxWidth</b> : Number<div class="sub-desc">The maximum width in pixels of the message box (defaults to 600)</div></li>\r
110 <li><b>minWidth</b> : Number<div class="sub-desc">The minimum width in pixels of the message box (defaults to 100)</div></li>\r
111 <li><b>modal</b> : Boolean<div class="sub-desc">False to allow user interaction with the page while the message box is\r
112 displayed (defaults to true)</div></li>\r
113 <li><b>msg</b> : String<div class="sub-desc">A string that will replace the existing message box body text (defaults to the\r
114 XHTML-compliant non-breaking space character '&amp;#160;')</div></li>\r
115 <li><a id="show-option-multiline"></a><b>multiline</b> : Boolean<div class="sub-desc">\r
116 True to prompt the user to enter multi-line text (defaults to false)</div></li>\r
117 <li><b>progress</b> : Boolean<div class="sub-desc">True to display a progress bar (defaults to false)</div></li>\r
118 <li><b>progressText</b> : String<div class="sub-desc">The text to display inside the progress bar if progress = true (defaults to '')</div></li>\r
119 <li><a id="show-option-prompt"></a><b>prompt</b> : Boolean<div class="sub-desc">True to prompt the user to enter single-line text (defaults to false)</div></li>\r
120 <li><b>proxyDrag</b> : Boolean<div class="sub-desc">True to display a lightweight proxy while dragging (defaults to false)</div></li>\r
121 <li><b>title</b> : String<div class="sub-desc">The title text</div></li>\r
122 <li><b>value</b> : String<div class="sub-desc">The string value to set into the active textbox element if displayed</div></li>\r
123 <li><b>wait</b> : Boolean<div class="sub-desc">True to display a progress bar (defaults to false)</div></li>\r
124 <li><b>waitConfig</b> : Object<div class="sub-desc">A <a href="output/Ext.ProgressBar.html#Ext.ProgressBar-waitConfig" ext:member="waitConfig" ext:cls="Ext.ProgressBar">Ext.ProgressBar.waitConfig</a> object (applies only if wait = true)</div></li>\r
125 <li><b>width</b> : Number<div class="sub-desc">The width of the dialog in pixels</div></li>\r
126 </ul>\r
127 Example usage:\r
128 <pre><code>Ext.Msg.show({\r
129    title: <em>'Address'</em>,\r
130    msg: <em>'Please enter your address:'</em>,\r
131    width: 300,\r
132    buttons: Ext.MessageBox.OKCANCEL,\r
133    multiline: true,\r
134    fn: saveAddress,\r
135    animEl: <em>'addAddressBtn'</em>,\r
136    icon: Ext.MessageBox.INFO\r
137 });</code></pre></div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-updateProgress"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-updateProgress">updateProgress</a></b>(&nbsp;<code>Number&nbsp;value</code>,&nbsp;<code>String&nbsp;progressText</code>,&nbsp;<code>String&nbsp;msg</code>&nbsp;)\r
138     :\r
139                                         Ext.MessageBox<div class="mdesc"><div class="short">Updates a progress-style message box's text and progress bar. Only relevant on message boxes&#13;\r
140 initiated via Ext.Messa...</div><div class="long">Updates a progress-style message box's text and progress bar. Only relevant on message boxes\r
141 initiated via <a href="output/Ext.MessageBox.html#Ext.MessageBox-progress" ext:member="progress" ext:cls="Ext.MessageBox">Ext.MessageBox.progress</a> or <a href="output/Ext.MessageBox.html#Ext.MessageBox-wait" ext:member="wait" ext:cls="Ext.MessageBox">Ext.MessageBox.wait</a>,\r
142 or by calling <a href="output/Ext.MessageBox.html#Ext.MessageBox-show" ext:member="show" ext:cls="Ext.MessageBox">Ext.MessageBox.show</a> with progress: true.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>value</code> : Number<div class="sub-desc">Any number between 0 and 1 (e.g., .5, defaults to 0)</div></li><li><code>progressText</code> : String<div class="sub-desc">The progress text to display inside the progress bar (defaults to '')</div></li><li><code>msg</code> : String<div class="sub-desc">The message box's body text is replaced with the specified string (defaults to undefined\r
143 so that any existing body text will not get overwritten by default unless a new value is passed in)</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-updateText"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-updateText">updateText</a></b>(&nbsp;<span title="Optional" class="optional">[<code>String&nbsp;text</code>]</span>&nbsp;)\r
144     :\r
145                                         Ext.MessageBox<div class="mdesc"><div class="short">Updates the message box body text</div><div class="long">Updates the message box body text<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>text</code> : String<div class="sub-desc">(optional) Replaces the message box element's innerHTML with the specified string (defaults to\r
146 the XHTML-compliant non-breaking space character '&amp;#160;')</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.MessageBox-wait"></a><b><a href="source/MessageBox.html#method-Ext.MessageBox-wait">wait</a></b>(&nbsp;<code>String&nbsp;msg</code>,&nbsp;<span title="Optional" class="optional">[<code>String&nbsp;title</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;config</code>]</span>&nbsp;)\r
147     :\r
148                                         Ext.MessageBox<div class="mdesc"><div class="short">Displays a message box with an infinitely auto-updating progress bar.  This can be used to block user&#13;\r
149 interaction wh...</div><div class="long">Displays a message box with an infinitely auto-updating progress bar.  This can be used to block user\r
150 interaction while waiting for a long-running process to complete that does not have defined intervals.\r
151 You are responsible for closing the message box when the process is complete.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>msg</code> : String<div class="sub-desc">The message box body text</div></li><li><code>title</code> : String<div class="sub-desc">(optional) The title bar text</div></li><li><code>config</code> : Object<div class="sub-desc">(optional) A <a href="output/Ext.ProgressBar.html#Ext.ProgressBar-waitConfig" ext:member="waitConfig" ext:cls="Ext.ProgressBar">Ext.ProgressBar.waitConfig</a> object</div></li></ul><strong>Returns:</strong><ul><li><code>Ext.MessageBox</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">MessageBox</td></tr></tbody></table><a id="Ext.MessageBox-events"></a><h2>Public Events</h2><div class="no-members">This class has no public events.</div></div>