Results 1 to 2 of 2

Thread: How to manage dynamicaly style of Ext.Component (not Ext.element) without using CSS ?

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    5
    Vote Rating
    0
      0  

    Question How to manage dynamicaly style of Ext.Component (not Ext.element) without using CSS ?

    Hello Mitchell,
    Thank you for your quick reply to my ask .How to manage dynamicaly style of Ext.element without using CSS ?
    However, I did a mistack with my previous ask.

    I want to apply style dynamicaly on Ext.Component (not Ext.Element) like applying an icon on header of Windows, changing text to bold on a Button... without using CSS.
    There is not setStyle on those objects.

    I have tried it but it don't work (no such method).
    myWindow.setStyle( { ( 'background-image': 'url(../icon/test.png)' ) } ) ;
    or
    if(test) myButton.setStyle( { ( 'font-weight': 'bold' ) } ) ;
    else myButton.setStyle( { ( 'font-weight': 'normal' ) } ) ;
    In ExtJS 2, it was possible to do something lile : myButton.addClass('boldStyle') or myButton.removeClass('boldStyle'). How I can do in ExtJS 4 ?

    Any other idea ?
    Thank in advance for your help.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,381
    Answers
    3997
    Vote Rating
    1536
      0  

    Default

    addCls and removeCls are the same as addClass and removeClass, just shorter names.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

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
  •