I want to set the width of each of the items in the table and use it. I want to use columns, but I want to adjust the width only.
layout: {
type: 'table',
columns : '3',
},
items : [
{
xtype : 'textfield' ,
margin : '5',
}
,
{
xtype : 'textfield' ,
margin : '5',
}
,
{
xtype : 'textfield' ,
margin : '5',
}
How about using a grid instead of a table?
Using Grid, you can give the width of each column as follows when drawing as shown in the image above.
Ext.create('Ext.grid.Panel', {
renderTo: document.body,
store: userStore,
width: 400,
height: 200,
title: 'Application Users',
columns: [
{
text: 'Name',
width: 100,
sortable: false,
hideable: false,
dataIndex: 'name'
},
{
text: 'Email Address',
width: 150,
dataIndex: 'email',
hidden: true
},
{
text: 'Phone Number',
flex: 1,
dataIndex: 'phone'
}
]
});
Source: https://docs.sencha.com/extjs/6.0/components/grids.html
© 2024 OneMinuteCode. All rights reserved.