プロパティ メソッド イベント ダイレクトリンク

Ext.MessageBoxクラス

パッケージ:Ext
定義ファイル:MessageBox.js
クラス:Ext.MessageBox
継承元:Object
メッセージボックスクラス。 このクラスは、Ext.Msgをエイリアスとして利用可能です。
このメッセージボックスは、JavaScriptのalertとは異なり、非同期で動作します。 表示したときに、JavaScriptコードが停止する訳ではありません。 ボタンが押された後の処理は、コールバック関数で処理します。 (参照:show)
使用方法:
// Basic alert:

Ext.Msg.alert('Status', 'Changes saved successfully.');

// Prompt for user data and process the result using a callback:

Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
    if (btn == 'ok'){
        // process text value and close...


    }
});

// Show a dialog using config options:

Ext.Msg.show({
   title:'Save Changes?',
   msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
   buttons: Ext.Msg.YESNOCANCEL,
   fn: processResult,
   animEl: 'elId',
   icon: Ext.MessageBox.QUESTION
});


This class is a singleton and cannot be created directly.

Utility class for generating different styles of message boxes. The alias Ext.Msg can also be used.


Note that the MessageBox is asynchronous. Unlike a regular JavaScript alert (which will halt browser execution), showing a MessageBox will not cause the code to stop. For this reason, if you have code that should only run after some user feedback from the MessageBox, you must use a callback function (see the function parameter for show for more details).

使用方法:
// Basic alert:

Ext.Msg.alert('Status', 'Changes saved successfully.');

// Prompt for user data and process the result using a callback:

Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
    if (btn == 'ok'){
        // process text value and close...


    }
});

// Show a dialog using config options:

Ext.Msg.show({
   title:'Save Changes?',
   msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
   buttons: Ext.Msg.YESNOCANCEL,
   fn: processResult,
   animEl: 'elId',
   icon: Ext.MessageBox.QUESTION
});


This class is a singleton and cannot be created directly.

プロパティ

プロパティ定義クラス
 CANCEL : Object
キャンセルボタン定数
Button config that displays a single Cancel button
Ext.MessageBox
 ERROR : String
エラーアイコン定数
The CSS class that provides the ERROR icon image
Ext.MessageBox
 INFO : String
情報アイコン定数
The CSS class that provides the INFO icon image
Ext.MessageBox
 Msg : Object
Ext.MessageBoxへのエイリアス
Shorthand for Ext.MessageBox
Ext.MessageBox
 OK : Object
OKボタン定数
Button config that displays a single OK button
Ext.MessageBox
 OKCANCEL : Object
OKボタンとキャンセルボタン定数
Button config that displays OK and Cancel buttons
Ext.MessageBox
 QUESTION : String
クエッションアイコン定数
The CSS class that provides the QUESTION icon image
Ext.MessageBox
 WARNING : String
警告アイコン定数
The CSS class that provides the WARNING icon image
Ext.MessageBox
 YESNO : Object
はいボタン、いいえボタン定数
Button config that displays Yes and No buttons
Ext.MessageBox
 YESNOCANCEL : Object
はいボタン、いいえボタン、キャンセルボタン定数
Button config that displays Yes, No and Cancel buttons
Ext.MessageBox
 defaultTextHeight : Number
複数行のテキストエリアを使用する際の、デフォルト高さを設定します。(初期値:75)
The default height in pixels of the message box's multiline textarea if displayed (defaults to 75)
Ext.MessageBox
 maxWidth : Number
メッセージボックスの最大幅(初期値:600)
The maximum width in pixels of the message box (defaults to 600)
Ext.MessageBox
 minProgressWidth : Number
プログレススタイルのメッセージボックスの最小幅を設定します。(初期値:250)
The minimum width in pixels of the message box if it is a progress-style dialog. This is useful for setting a different minimum width than text-only dialogs may need (defaults to 250)
Ext.MessageBox
 minWidth : Number
メッセージボックスの最小幅(初期値:110)
The minimum width in pixels of the message box (defaults to 110)
Ext.MessageBox

メソッド

メソッド定義クラス

イベント

このクラスで公開されているイベントはありません。