-
Sencha User
How to use an icon as "value" of "displayfield"?
I wish to have an icon displayed as "value" for a form "displayfield". This is to display read-only values like true/false and yes/no with icons like "tick mark/cross mark". How to do it? There are many posts on labels but that is not what I am looking for. I need a "fieldLabel" and then the icon (it is not mandatory to use a form though, I may use any component for this).
-
See the source for displayfield.
I think I'd try overriding getDisplayValue in a subclass. You should be able to generate whatever markup you need, then a bit of CSS and you're done.
-
Sencha User
Finally did the following:
{ xtype: 'fieldcontainer', fieldLabel: 'Label 1', flex: 1, name: 'Name 1', items: [{ xtype: 'image', glyph: '[email protected]' }] },{ xtype: 'fieldcontainer', fieldLabel: 'Label 2', flex: 1, name: 'Name 2', items: [{ xtype: 'image', glyph: '[email protected]' }] }
-
I think your approach is quite valid.
Regards,
Brian
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules