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 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,335
    Answers
    3885
    Vote Rating
    1297
      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
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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
      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
  •