1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    Berlin
    Posts
    4
    Vote Rating
    0
    MoePi is on a distinguished road

      0  

    Question assign cls-class at em-tag outside buttons

    assign cls-class at em-tag outside buttons


    I would use sprites for icons. But on using iconCls there is a positioning problem:
    The icon does'nt stayes at left side. Text covers it.
    So I would use <em> tag:
    Code:
    <em class="" unselectable="on">
        <button id="xyz" class=" x-btn-text ui-silk ui-silk-note-go" type="button">Speichern</button>
    </em>
    The css-code is unspectacular:
    Code:
    button.ui-silk{ 
        width                   :   16px !important; 
        height                  :   16px !important; 
        background              :   transparent url(/pics-VT/silk-sprite.png)  !important;
        background-repeat       :   no-repeat !important; 
    }
    .ui-silk-note-go{ 
        background-position     :   -336px -0px !important
    }
    But, if there are any ideas, how I can position sprites at left side, this would be a solution.

    I'm sorry for this bad English and thank you in anticipation for your help!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,795
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Code:
        var button = new Ext.Button({
            renderTo : Ext.getBody(),
            text     : 'Hello',
            iconCls  : 'test'
        });
    Will add 18px to the left and you should place your image int he background of the button tag and have it only 16px by 16px (for each sprite)
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Location
    Berlin
    Posts
    4
    Vote Rating
    0
    MoePi is on a distinguished road

      0  

    Default


    The iconCls works perfect with single images. But I want to use sprites.
    The effect will show this screenshot: position.png
    The background-image is positioned behind the text.
    The padding-left:18px is unchanged...

    Hope, this better can explain my question.

    Thank you for your quick reply

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Location
    Berlin
    Posts
    4
    Vote Rating
    0
    MoePi is on a distinguished road

      0  

    Default


    I think, I've to overwrite onRender for buttons and especially this part

    Code:
    if(position){
        btn = this.template.insertBefore(position, targs, true);
    }else{
        btn = this.template.append(ct, targs, true);
    }
    ... but I dont now how.

    Oh: I'm using V. 3.2.1

  5. #5
    Sencha User
    Join Date
    Sep 2011
    Location
    Berlin
    Posts
    4
    Vote Rating
    0
    MoePi is on a distinguished road

      0  

    Default


    Can anyone give support, Please?
    I couldn't solve this problem...

    Thanks in advance!

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi