PDA

View Full Version : MessageBox is cutting up the text inside



jaisolbar
3 Sep 2013, 2:48 PM
Hi,


Somehow the MessageBox is cutting the text inside up:


Use case:
records.data.fact: 'path'
records.data.value: "c:\Program Files (x86)\Puppet Labs\Puppet\puppet\bin;c:\Program Files (x86)\Puppet Labs\Puppet\facter\bin;c:\Program Files (x86)\Puppet Labs\Puppet\hiera\bin;c:\Program Files (x86)\Puppet Labs\Puppet\bin;c:\Program Files (x86)\Puppet Labs\Puppet\sys\ruby\bin;c:\Program Files (x86)\Puppet Labs\Puppet\sys\tools\bin;c:\Program Files (x86)\Puppet Labs\Puppet\puppet\bin;c:\Program Files (x86)\Puppet Labs\Puppet\facter\bin;c:\Program Files (x86)\Puppet Labs\Puppet\hiera\bin;c:\Program Files (x86)\Puppet Labs\Puppet\bin;c:\Program Files (x86)\Puppet Labs\Puppet\sys\ruby\bin;c:\Program Files (x86)\Puppet Labs\Puppet\sys\tools\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\System Center Operations Manager 2007\;C:\Windows\System32\Windows System Resource Manager\bin;"


Code:

Ext.MessageBox.show({ title: 'Fact: ' + records.data.fact, msg: 'Value: ' + records.data.value, buttons: Ext.Msg.OK,});


Results:

45662


Any idea how to indent/wrap the text inside (with length > 500)?


Thanks!

ettavolt
4 Sep 2013, 1:33 AM
.x-window-text .x-form-display-field {
word-wrap:break-word;
}

jaisolbar
4 Sep 2013, 8:44 AM
.x-window-text .x-form-display-field {
word-wrap:break-word;
}

I added the css code and still getting the same results (unwrapped text inside).

Any idea?

Thanks again!

ettavolt
6 Sep 2013, 3:50 AM
Ok, What version do you use?

shashankbs086
6 Sep 2013, 6:50 AM
May be the autowidth for the box is disabled. Try giving the height and the width config inside the Ext.MessageBox.Show

jaisolbar
6 Sep 2013, 8:46 AM
ettavolt,

Version: Ext JS 4.1.1

Thanks!

jaisolbar
6 Sep 2013, 8:47 AM
shashankbs086,

I don't find the autowidth config option.
http://docs.sencha.com/extjs/4.1.1/#!/api/Ext.MessageBox

Thanks!

ettavolt
8 Sep 2013, 11:40 PM
Ok, jaisolbar, you need Ext.Msg.msg.anchor = '100%';. Set this anywhere after Ext is loaded.