PentaKon
PentaKon

Reputation: 4646

Creating a readonly textfield without the field in Extjs

Essentially what I'm looking for a is an xtype: 'text' but with the fieldLabel property on it. I know I can use textfield but I want my text to be readOnly: true and the field and the cursor should not exist.

I know I could just do xtype: 'text' and have its text value like: text: 'Label: My Text' but then I lose the ability to use the setText(value) method in order change just the text AFTER the label. Using xtype: 'text' forces be to create workarounds in order to keep the label intact and I want to avoid that.

Upvotes: 0

Views: 152

Answers (1)

Saki
Saki

Reputation: 5856

Isn't displayfield the field you are looking for?

Upvotes: 1

Related Questions