1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    0
    m2276699 is on a distinguished road

      0  

    Default 4.1 RC3 DataView Width is invalid

    4.1 RC3 DataView Width is invalid


    hi,I changed the desktop DataView Tpl and set the width is 600.it works in 4.1RC1,but it doesn't work in 4.1RC2 and RC3.in RC2 and RC3 the width is 100%,help me.

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,490
    Vote Rating
    283
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    I think you'll have to wrap the DataView in an extra level of container. Give the container a vbox layout and the DataView a flex of 1 and a width of 600 and it should look the way you want.

    Seems a bit odd to give the wallpaper and the DataView different sizes though.

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    0
    m2276699 is on a distinguished road

      0  

    Default


    Because I need to group,so I horizontally it,any ideas?

  4. #4
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    0
    m2276699 is on a distinguished road

      0  

    Default


    PHP Code:
    createDataView: function () {
    var 
    me this;
    return {
      
    xtype'container',
      
    width600,
      
    bodyBorder:false,
      
    style: { position'absolute'}
      
    x0y0,
      
    items: [{
      
    xtype'dataview',
      
    flex1,
      
    overItemCls'x-view-over',
      
    trackOvertrue,
      
    loadMaskfalse,
      
    itemSelectorme.shortcutItemSelector,
      
    storeme.shortcuts,
      
    tpl: new Ext.XTemplate(me.shortcutTpl)
    }]
    };

    The Container's width is 100%..

    Quote Originally Posted by skirtle View Post
    I think you'll have to wrap the DataView in an extra level of container. Give the container a vbox layout and the DataView a flex of 1 and a width of 600 and it should look the way you want.

    Seems a bit odd to give the wallpaper and the DataView different sizes though.

  5. #5
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,490
    Vote Rating
    283
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    You're missing the vbox layout on the container. The width needs to go on the DataView, not the container. You can't really avoid the container being stretched to 100% because it's in a fit layout but it should be largely irrelevant if the DataView itself is only 600 wide as the rest of the container will just be space.

Thread Participants: 1