1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    1
    Vote Rating
    0
    rahulcs is on a distinguished road

      0  

    Question How to change Height and Width of XTemplate

    How to change Height and Width of XTemplate


    Dear All,
    I am using Ext.Dataview component and have XTemplate inside it. I want users to resize this Dataview components i.e. User can change the height and width of this component. The problem is, when Dataview's size changes, due to resizing, the XTemplate[DIV] inside the dataview, remains of the same height and width. I will like these XTemplates[DIV] to resize themself.

    Is there a way to make this happen ?

    Thanks in advance.


    With Regards,
    Rahul

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    851
    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


    You should have them be resizable
    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
    Apr 2012
    Posts
    57
    Vote Rating
    0
    NCN is on a distinguished road

      0  

    Default Resizeing the Xtemple

    Resizeing the Xtemple


    The same happen with me. I write as below :-

    itemTpl: new Ext.XTemplate("<div><table cellpadding='0' border='0'><tr><td>Data 1</td><td></td><td>&nbsp;&nbsp;</td><td></td><td></td></tr><tr><td>Data 2</td><td></td><td></td><td></td><td>Data 3></td></tr></table></table></div>"),

    it is in panel.
    But when we are resizeing the pane or minimizing browser , the Xtemple remain same in size.
    I need that it will resize as we resize the pane or minimizing browser .

    thanks In advance...!!

    can show some demo code.

  4. #4
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    are you using the fit layout?

  5. #5
    Sencha User
    Join Date
    Apr 2012
    Posts
    57
    Vote Rating
    0
    NCN is on a distinguished road

      0  

    Default


    I am using the Container with layout: 'hbox',

    as below:-

    Ext.define('XYZ', {
    extend: 'Ext.Container'
    config: {
    layout: 'hbox',
    items: [

    { xtype:'container',
    margin: '32 10 0 0',
    items:[{xtype: 'dataview',
    scrollable: false,
    itemTpl: new Ext.XTemplate("<table cellpadding='0' border='0'><tr><td>Data1</td><td></td><td></td><td></td><td></td></tr><tr><td>Data 2</td><td></td><td></td><td></td><td>Data 3</td></tr></table></table>"),
    }]}],

    },

    });

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>.

    it is in panel/container.
    But when we are resizeing the pane or minimizing browser , the Xtemple remain same in size.
    I need that it will resize as we resize the pane or minimizing browser .


    thanks In advance...!!


    can show some demo code.

  6. #6
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi,

    you can use scrolling for Xtemplate area ,it will be working
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  7. #7
    Sencha User
    Join Date
    Apr 2012
    Posts
    57
    Vote Rating
    0
    NCN is on a distinguished road

      0  

    Default


    Can you show sample some code, with respect to my code.

    Thanks in advance.