Bir TabPanel var boyutlandırmak değil bir panel içine gridpanel. Sekmede, bir araç çubuğu ve 3 öğe içeren bir panelim var: [fieldset, gridpanel ve başka bir fieldet (veya bazı düğmeler)]. Kaydırma çubuğunu göstermek için ızgara panelini alamıyorum. Sadece ızgara panelinin maksimum yüksekliğini/ayarını ayarladığımda çalışır.
Izgarapaneli bir konteynerin içine sarmayı da denedim. Şanssız. Örnekte, uygun düzeni kullanıyorum. "Çapa" düzenini denedim ve tarayıcıyı yeniden boyutlandırdığımda yeniden boyutlandıracağı umuduyla "% 100% 50" adlı ızgarayı belirledim. Şanssız. gridpanel sekmede SADECE madde ise extjs Autoscroll veya
fit
düzene sahip, henüz fazla 1 öğe (fieldset, gridpanel ve başka fieldset) sahip olduğunu
Ext.application({
name: 'MyApp',
launch: function() {
// create the data store
var d = ['company', 100];
var myData = [];
for (var i = 0; i < 50; i++) {
myData[i] = d;
}
var store = Ext.create('Ext.data.ArrayStore', {
fields: [{
name: 'company'
}, {
name: 'price',
type: 'float'
}],
data: myData
});
Ext.create("Ext.container.Viewport", {
layout: {
type: 'border'
},
items: [{
xtype: 'toolbar',
id: 'headerbar',
region: 'north',
height: 30
}, {
xtype: 'toolbar',
id: 'menubar',
region: 'north',
height: 30
}, {
xtype: 'tabpanel',
itemId: 'maintabpanel',
activeTab: 0,
region: 'center',
plain: true,
margins: '5 5 5 5',
layout: 'fit',
items: [{
closable: false,
title: 'Tab',
margins: '0 0 0 0',
items: [{
xtype: 'panel',
title: 'Panel',
layout: 'fit',
tools: [{
type: 'help',
tooltip: 'Help'
}, {
type: 'close',
tooltip: 'Close'
}],
items: [{
xtype: 'fieldset',
title: 'Field Set',
layout: 'hbox',
items: [{
xtype: 'textfield',
fieldLabel: 'Input'
}]
}, {
xtype: 'gridpanel',
autoScroll: true,
store: store,
columns: [{
text: 'Company',
flex: 1,
sortable: true,
dataIndex: 'company'
}, {
text: 'Price',
flex: 1,
sortable: true,
dataIndex: 'price'
}],
viewConfig: {
autoFit: true
}
}, {
xtype: 'fieldset',
title: 'Field Set 2',
layout: 'hbox',
items: [{
xtype: 'textfield',
fieldLabel: 'Output'
}]
}]
}]
}]
}, {
xtype: 'box',
id: 'footer',
region: 'south',
html: '<h1> Copyright 2012</h1>',
height: 30
}]
});
}
});
Sorununuza bir çözüm buldunuz mu? – Elias