View Full Version : displaying text

13 Mar 2012, 5:59 AM
I haven't really thought about it until now. But what would be considered a correct way to display text that only has an informing/title/whatever function?

So far I've taken to using form.Label and that works for me.

I wasn't 100% positive if this was a good code idea anyhow when I started using that.
So is there a better way?

the text would have no function whatsoever other than informing and shouldn't be editable. Unless you're messing with it from the application itself

13 Mar 2012, 6:16 AM
Ext.form.field.Display (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.form.field.Display) is also good!

13 Mar 2012, 6:19 AM
Ext.form.field.Display (http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.field.Display) is also good!

I've considered that once. But that fact you can set a label for it kinda scared me of xD

So can I suppose that both of these are just as valid?

13 Mar 2012, 6:26 AM
i think 'displayfield' is better... the purpose of 'label' is to be associated to a field!
if you have an Ext.form.field.Display (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.form.field.Display) inside a form, it's easier to bind it to some data!