Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    11
    Vote Rating
    0
    nohaapav is on a distinguished road

      0  

    Default Max Height for autoSizing of Component

    Max Height for autoSizing of Component


    Hi guys,
    i've created my own treecombo which extends TriggerField with autosizing for this component. I would like to create some criteria for autosizing like when height > 300 then use hardcoded height 300 and show vertical scrollbar. Is it somehow possible ? Reason for that is the fact that if i expand many nodes in tree then combo size becames bigger than actual page size is and user is unable to see many of nodes ..

    initializaton of combo looks like:

    Code:
    initList: function() {
            var root = new Ext.tree.AsyncTreeNode({
                text: this.rootText
            });
            
            this.list = new Ext.tree.TreePanel({
                rootVisible: true,
                cls: this.treeCls,
                autoScroll: true,
                containerScroll: true,
                loader: new Ext.tree.TreeLoader(),
                floating: true,
                autoSize: true,
                listeners: {
                    click: this.onNodeClick,
                    scope: this
                },
                alignTo: function(el, pos) {
                    this.setPagePosition(this.el.getAlignToXY(el, pos));
                }
            });
            
            this.list.setRootNode(root);
        },
    rest of code is not important i guess and i'm using sentcha 3.4
    Thx for any help
    Pavol

  2. #2
    Sencha User
    Join Date
    Jan 2011
    Posts
    544
    Vote Rating
    51
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      0  

    Default


    AutoSizing components usually also have a maxHeight config for this purpose (e.g. textarea).

    However, if you place the treePanel inside another panel with a 'fit' layout, then you should automatically get a scrollbar once the treepanel exceeds the height of the containing panel anyway...

  3. #3
    Sencha User
    Join Date
    Jan 2013
    Posts
    11
    Vote Rating
    0
    nohaapav is on a distinguished road

      0  

    Default


    Quote Originally Posted by willigogs View Post
    AutoSizing components usually also have a maxHeight config for this purpose (e.g. textarea).

    However, if you place the treePanel inside another panel with a 'fit' layout, then you should automatically get a scrollbar once the treepanel exceeds the height of the containing panel anyway...
    Thx willigogs for answer, but problem is that if i set parent panel with some fixed height or fit layout and number of nodes is low number i will see white space which i want to avoid .. therefor it will be better to have autoresizing till height < 300 and if height exceed 300 then set fixed height to see scrollbar

    Check picture for example:

    pic1.png
    Attached Images

  4. #4
    Sencha User
    Join Date
    Jan 2011
    Posts
    544
    Vote Rating
    51
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      0  

    Default


    In that case, simply add a CSS max-height attribute to the treepanel

    Code:
    this.list = new Ext.tree.TreePanel({
        ...CONFIGS HERE...
        style: {
            maxHeight:'300px',
            overflow:'auto'
        }
    })
    Be aware this won't work for IE6 and below though, since it doesn't support the max-height CSS rule.

  5. #5
    Sencha User
    Join Date
    Jan 2013
    Posts
    11
    Vote Rating
    0
    nohaapav is on a distinguished road

      0  

    Default


    yep man it works .. i was trying maxHeight attribute before but i forgot to set overflow to auto

    You've made my day .. thx a lot !!!

  6. #6
    Sencha User
    Join Date
    Jan 2013
    Posts
    11
    Vote Rating
    0
    nohaapav is on a distinguished road

      0  

    Default


    Maybe one more thing which you can help me with ..

    I'm styling this component now and want to have border (black ones) around list component which is solved by adding class by

    Code:
    this.list = new Ext.tree.TreePanel({
                rootVisible: true,
                cls: 'someClass'
    });
    But problem is that i have still some border(blue ones) around data in list component pointing to:
    <div id="ext-gen313" class="x-panel-body x-panel-body-noheader">
    and i would like to set these borders to none but i dont know which bloody component render that ..

    Check picture:

    pic3.png

  7. #7
    Sencha User
    Join Date
    Jan 2011
    Posts
    544
    Vote Rating
    51
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      0  

    Default


    Try adding border: false to your treepanel config

  8. #8
    Sencha User
    Join Date
    Jan 2013
    Posts
    11
    Vote Rating
    0
    nohaapav is on a distinguished road

      0  

    Default


    works!!! thx again ..

  9. #9
    Sencha User
    Join Date
    Jan 2013
    Posts
    11
    Vote Rating
    0
    nohaapav is on a distinguished road

      0  

    Default


    Btw i've spotted another problem. Check pictures:

    Firefox: Autosizing bug ? Scrollbar overrides a part of text

    FF.png

    Chrome: same as firefox

    GCH.png

    IE: Autosizing works ok!

    IE.png

    Is it some bug regarding calculation of size by autoSize function ?

  10. #10
    Sencha User
    Join Date
    Jan 2013
    Posts
    11
    Vote Rating
    0
    nohaapav is on a distinguished road

      0  

    Default


    It will be good to know where this autosizing is done at least .. I checked all the component to last child

    TreePanel<--Panel<--Container<--ext.BoxComponent<--Component and was unable to find function which handle that ..

Thread Participants: 1

Tags for this Thread