Ext.msg.alert只呈现第一行

时间:2011-08-05 07:29:37

标签: sencha-touch alert extjs

我正在开发适用于Android设备的应用,当我按如下方式使用Ext.msg.alert时:

Ext.msg.alert('Little fox jumped over something');

只有文字“Little fox jumped”会在警告中显示,因为文字到达屏幕的右边框,并且它不会自动将其余部分放在第二行。

我认为这是某种自动调整问题(?)。Ext.msg.alert不会使文本适合其边界(?)。

我试过

Ext.msg.alert('Little fox jumped over something').doComponentLayout();

Ext.msg.alert('Little fox jumped over something').doLayout();

但那些没用。

有没有人遇到过这个问题?有什么建议吗?

谢谢。

1 个答案:

答案 0 :(得分:10)

该功能有3个参数:

Ext.Msg.alert('Title', 'The quick brown fox jumped over the lazy dog.', Ext.emptyFn);

尝试使用“较长”文本设置第二个参数。应如下所示:http://dev.sencha.com/deploy/touch/docs/?class=Ext.MessageBox

相关问题