1. #1
    Sencha - Support Team keckeroo's Avatar
    Join Date
    Mar 2008
    Location
    Winnipeg, Canada
    Posts
    323
    Vote Rating
    10
    keckeroo will become famous soon enough

      0  

    Exclamation [2.2] Ext.action setText quirks

    [2.2] Ext.action setText quirks


    I have the following definition :

    Code:
    icaMail.quickBtn = new Ext.Action({
       iconCls: 'icon-mail-unread',
       text: '',
       handler: function() {
          // blah 
       }
    });
    and used like this

    Code:
        tbar: new Ext.Toolbar({
           items: [
              new Ext.Button(icaMail.quickBtn)
           ]
        }),
    Initially the button appears properly with just the icon. However when i issue

    Code:
    icaMail.quickBtn.setText('(1)');
    The text '(1)' appears OVER the icon .

    There appears to be some quirks in the text rendering and you can replicate some problems at will with the Action interactive example 'change text' feature. You can change the text fine - but try entering a 'space' and see what happens. The icon rendering screws up a bit.

    Kev

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,544
    Vote Rating
    64
    Animal is a jewel in the rough Animal is a jewel in the rough Animal is a jewel in the rough

      0  

    Default


    putting a non-breaking space in the text: Ampersand hash 160 semicolon.

    It decides upon the CSS styles to apply (Needs space for an icon or not) depending upon the initial value of the text. and '' means no text.

Thread Participants: 1