1. #1
    Sencha User
    Join Date
    Feb 2010
    Posts
    34
    Vote Rating
    0
    umit is on a distinguished road

      0  

    Default Button and Cls

    Button and Cls


    Hi everyone!

    I try to make a minute picker with buttons and a Textfield to display the choosen buttons.
    The idea is, that i have 60 buttons and when i press at it, it will remain marked.

    However i got several problems:
    1.Ext.Button seems to ignore my "width" attribute.
    i solved this somehow by if(i<10) text="0"+i;

    2. I cant change the class of the button when i click it.

    my Code:
    Code:
    var minuten=new Ext.FormPanel({layout:"table",width:220,defaults: {bodyStyle:'padding:20px'},layoutConfig: {columns: 10},items:[]});
    
            for(var i=0;i<60;i++){
                var text=i;
                i?i:text="0";
                if(i<10)
                    text="0"+i;
    
                minuten.items.add(new Ext.Button({cls:"x-btn",selected:true,"text":text,id:"abruf_minutenb_"+text,listeners:{"click":function(thiss){
                            Ext.ComponentMgr.get("datenabruf_auto_minuten").setValue(Ext.ComponentMgr.get("datenabruf_auto_minuten").getValue()+this.text);
    alert(this.cls);//?? undefinded??                       
    this.cls="x-btn-click x-btn";//not working...
    thiss.cls="x-btn-click x-btn";//not working...
                            
                    }}}));
            }
            var popup=new Ext.Window({
                id:"zeitsteuerung_window",
                title:"Zeitsteuerung",
                renderTo:Ext.getBody(),
                width:621,
                height:500,
                items:[
                    minuten,{
                        xtype:"textfield",
                        id:"auto_minuten",
                        width:100,
                        text:" "
                    }
                ]
        });
    
    
        popup.show();
    any suggestions are welcome

  2. #2
    Sencha User
    Join Date
    Feb 2010
    Posts
    34
    Vote Rating
    0
    umit is on a distinguished road

      0  

    Default


    ok i did it with thiss.addClass("btn-...") and thiss.removeClass()

    But another problem arised:
    how do i use the mousedown event on a button?

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