Results 1 to 3 of 3

Thread: View with left vertical scrollbar

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    14
    Answers
    1
    Vote Rating
    0
      0  

    Question 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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,062
    Answers
    3976
    Vote Rating
    1391
      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 @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    14
    Answers
    1
    Vote Rating
    0
      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>

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •