PDA

View Full Version : where define Object config



ttl_web
6 Sep 2007, 4:07 PM
hi
I have a problem (Ext 1.1.1 docs.js)

layout = new Ext.BorderLayout(document.body, {
north: {
split:false,
initialSize: 32,
titlebar: false
},
west: {
split:true,
initialSize: 250,
minSize: 175,
maxSize: 400,
titlebar: true,
collapsible: true,
animate: true,
useShim:true,
cmargins: {top:2,bottom:2,right:2,left:2}
},
center: {
titlebar: true,
title: '查看文档',
autoScroll:false,
tabPosition: 'top',
closeOnTab: true,
resizeTabs: true
}
});

where define - split,initialSize,....

I know :
BorderLayout
public function BorderLayout( String/HTMLElement/Element container, Object config )
but where define - Object config

thanks

catacaustic
6 Sep 2007, 4:45 PM
The object config area is everything at the end of the objects creation, so for your example...
layout = new Ext.BorderLayout(document.body, {
north: {
split:false,
initialSize: 32,
titlebar: false
},
west: {
split:true,
initialSize: 250,
minSize: 175,
maxSize: 400,
titlebar: true,
collapsible: true,
animate: true,
useShim:true,
cmargins: {top:2,bottom:2,right:2,left:2}
},
center: {
titlebar: true,
title: '查看文档',
autoScroll:false,
tabPosition: 'top',
closeOnTab: true,
resizeTabs: true
}
});Everything that's marked in red is the "config" object. As far as I know (if I''m wrong, someone please correct me), the options for this come from the Ext.LayoutRegion object, so look into that for the available options for setting up the regions.