csssencha-touchsencha-touch-2sencha-touch-2.3sencha-touch-theming

Sencha Touch: Change text color of a component


I have a simple View (Container) containing a component. Content is added to this component using Ext.getCmp('foo').setHtml('bar');

I want now to change the text color of the component "foo". Using the style-property works fine, but only as long as styleHtmlContent is set to false.

How can I change the text color but still setting styleHtmlContent to true?


Solution

  • Setting the property styleHtmlCls to <myClass> on the specific component was the trick! Doing so I was able to create an custom css file which contains <myClass> where the custom color is specified...