1. #1
    Sencha User
    Join Date
    May 2008
    Posts
    262
    Vote Rating
    -4
    mnask79 is infamous around these parts

      0  

    Default panel scroll

    panel scroll


    hi guys ,

    im trying to make my panel autoscroll but it dose not work ,, i dont know why

    my script is :

    Code:
    var tpl = new Ext.XTemplate(
                    '<table width="100%" border="0">',
                      '<tr>',
                        '<td width="98"><b></strong>ord</b></td>',
                        '<td width="126">{order_id}</td>',
                      '</tr>',
                      '<tr bgcolor="#F4F4F4">',
                        '<td><b> text</b></td>',
                        '<td>{market_order_id}</td>',
                      '</tr>','</table>'
                     );
    
    
    var leftP = new Ext.Panel({
                id:'lp',
                region:'center',
                autoScroll : true , ------ > dose not work
                layout:'fit',
                width : 300            
            })
    
    function makeXtemplate(dstore, drecords){
                tpl.overwrite(leftP.body, drecords[0].data);                
            }    
    
     Ext.xx.ordersHistory.superclass.constructor.call(this,{    
                layout:'border',            
                    items: [
                        leftP, {
                       
                        region: 'east',        
                        width: 380,
                        layout:'fit',
                        border : false ,
                        collapsible: true,        
                        margins:'0 5 0 0',                    
                        items : [{
                            title: 'title',
                            items: [grid]
                        }]
                    }] 
            
            });
    in firebug :
    HTML Code:
    <div id="lp" class="x-panel x-border-panel" style="width: 271px; left: 0px; top: 0px;"><div id="ext-gen2593" class="x-panel-bwrap"><div id="ext-gen2594" class="x-panel-body x-panel-body-noheader" style="width: 269px; height: 211px;"> ---- >  when i add manualy to style overflow:auto its working 
    <table border="0" width="100%"><tbody>
    </tbody>
    </div></div></div>
    thanks

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,501
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    It should work. There must be some other code which overwrites that style.

    But why do you have your east as a Panel which contains a Panel which contains your Grid?

    What made you stop at 3 levels of nesting? Why not wrap your grid up in 50 Panels and put the whole bundle in s the east region??

    But seriously, just configure the GridPanel with region: 'east', title: 'title', and use it directly.

  3. #3
    Sencha User
    Join Date
    May 2008
    Posts
    262
    Vote Rating
    -4
    mnask79 is infamous around these parts

      0  

    Default


    But why do you have your east as a Panel which contains a Panel which contains your Grid?

    because they want the title for gride panel look like tab

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,501
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    What? What do you mean?

  5. #5
    Sencha User
    Join Date
    May 2008
    Posts
    262
    Vote Rating
    -4
    mnask79 is infamous around these parts

      0  

    Default


    ok man , really thanks , i got u

  6. #6
    Sencha User
    Join Date
    May 2008
    Posts
    262
    Vote Rating
    -4
    mnask79 is infamous around these parts

      0  

    Default


    man u r right , i overwrite the style

    Code:
    Ext.Panel.prototype.afterRender = function(){
            if(this.fromMarkup && this.height === undefined && !this.autoHeight){
                this.height = this.el.getHeight();
            }
            if(this.floating && !this.hidden && !this.initHidden){
                this.el.show();
            }
            if(this.title){
                this.setTitle(this.title);
            }
            if(this.autoScroll){
                //this.body.dom.style = this.body.dom.style+';overflow:hidden;overflow-x:auto';
            }
            if(this.html){
                this.body.update(typeof this.html == 'object' ?
                                 Ext.DomHelper.markup(this.html) :
                                 this.html);
                delete this.html;
            }
            if(this.contentEl){
                var ce = Ext.getDom(this.contentEl);
                console.log(ce+' c='+c);
                Ext.fly(ce).removeClass(['x-hidden', 'x-hide-display']);
                this.body.dom.appendChild(ce);
            }
            if(this.collapsed){
                this.collapsed = false;
                this.collapse(false);
            }
            Ext.Panel.superclass.afterRender.call(this); // do sizing calcs last
            this.initEvents();
    }

    but the problem when i un comment this script i got an error
    if(this.autoScroll){
    //this.body.dom.style = this.body.dom.style+';overflow:hidden;overflow-x:auto';
    }


    what shall i do ?

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,501
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Why are you overriding afterRender?

    You broke it. autoScroll works for everyone.

  8. #8
    Sencha User
    Join Date
    May 2008
    Posts
    262
    Vote Rating
    -4
    mnask79 is infamous around these parts

      0  

    Default


    but really it dose not work !!!!

  9. #9
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,501
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Er. But really it does.

    You have a bug.

    And we can't see your code.

Thread Participants: 1

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