1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    14
    Answers
    1
    Vote Rating
    0
    fostom is on a distinguished road

      0  

    Question Unanswered: View with left vertical scrollbar

    Unanswered: View with left vertical scrollbar


    Hi!

    I have a view like this which give me a nice scrollbar on the regular right side:

    Code:
    Ext.define('Agresso.ResourcePlanner.view.ResourceListView', {
        extend: 'Ext.view.View',
        ...
        autoScroll: true,
    
        initComponent: function () {
            var template = new Ext.XTemplate(
                    '<tpl for=".">',
                        '<div class="resource-ct">',
                            '{[this.getResourceImage(values.ResourceImageDocId)]}',
                            '<div class="resourceName">{ResourceName}</div>',
                            '<div class="resourceLabel">Start: <span class="resourceTextValue">{[this.formatDate(values.StartDate)]}</span></div>',
                            '<div class="resourceLabel">End: <span class="resourceTextValue">{[this.formatDate(values.EndDate)]}</span></div>',
                            '<div class="resourceLabel">Time: <span class="resourceTextValue">{Time} hours</span></div>',
                        '</div>',
                    '</tpl>', {
                       ......
                    }
                );
    
            Ext.apply(this, {
                tpl: template
            });
    
            this.callParent(arguments);
        }
    });
    ...but I would like to have the vertical scrollbar on the left side. Anybody who know how to do that?

    Tom

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,643
    Answers
    3453
    Vote Rating
    816
    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


    On the element that has the scrollbar, you can try setting the CSS direction:rtl; but I'm not sure what ramifications this will have or if it will work reliably.
    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
    Posts
    14
    Answers
    1
    Vote Rating
    0
    fostom is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    On the element that has the scrollbar, you can try setting the CSS direction:rtl; but I'm not sure what ramifications this will have or if it will work reliably.
    Yeah, thanks, that'll do the trick. It kinda fixes the issue with this, but it is a problem that the height of the child have to be set to a fixed size..

    <style type="text/css">
    .parent{
    height:300px;
    width:200px;
    overflow:auto;
    direction:rtl;
    }
    .child{
    height:500px;
    width:100%;
    direction:rtl;
    }
    </style
    <div class="parent">
    <div class="child"></div>
    </div>

Thread Participants: 1

Tags for this Thread