1

これが正常に動作するコードです。

Ext.Msg.show({
    title: 'The title',
    message: 'and some text...',
    scope: this,
    buttons : [
       {
         itemId : 'no',
         text   : 'Top button'
       },
       {
           itemId : 'yes',
           text   : 'Bottom button'
         }
       ],
    fn: function(btn) {
      if (btn == 'yes'){
       //do something
      }
     }
});

ボタンを縦に並べるには?デフォルトでは、横一列に並んでいます。

4

1 に答える 1

2

に 2 つのボタンしかない場合は、' Docked ' プロパティExt.Msg.Showを使用して目的の結果を得ることができます。(このような):

幸運を!

更新されたコードは次のとおりです。

Ext.Msg.show({

    title: 'The title',
    message: 'and some text...',

    scope: this,
    buttons : [

       {

         docked: 'top',
         itemId : 'no',
           id: 'no',
         text   : 'Top button'
       },
       {

           docked: 'bottom',
           itemId : 'yes',
           id : 'yes',
           text   : 'Bottom button'
         }
       ],
    fn: function(btn) {
      if (btn == 'yes'){
       //do something
      }
     }
});
于 2013-07-24T11:27:54.437 に答える