level 8
我可是正经人☜
楼主
本菜鸟没事在家自学ExtJs想自己做个界面,看了很多资料说的都很好。但是上面说了控件要怎么做但是没说控件做出来了里面怎么调样式所以小弟非常困扰。特来此请教。
以下是小弟自己试做的一个界面源码如下:
Ext.onReady(function() {
Ext.QuickTips.init();
var bd = Ext.getBody();
bd.createChild({tag: 'h2', html: '11111'}); var tabs = Ext.widget({
xtype: 'form',
id: 'tabForm',
bodyPadding: '5 5 0',
width: 600,
fieldDefaults: {
labelAlign: 'top',
msgTarget: 'side'
},
items: {
xtype:'tabpanel',
activeTab: 0,
defaults:{
bodyPadding: 10,
layout: 'anchor'
}, items:[{
title:'ceshi',
defaultType: 'textfield',
defaults: {
anchor: '100%'
},
items: [{
fieldLabel: '11',
name: 'first',
anchor:'45%',
},{
fieldLabel: 'eeeee',
name: 'last',
anchor:'45%',
},{
fieldLabel: 'yyyyyy',
name: 'company',
anchor:'45%',
},{
fieldLabel: 'aaaaa',
name: 'last',
anchor:'45%',
},{
fieldLabel: '33',
name: 'email',
anchor:'45%'
}]
},{
title: 'fujian',
defaultType: 'textfield',
defaults: {
anchor: '100%'
},
items: [{
fieldLabel: 'Home',
name: 'home',
},{
fieldLabel: 'Business',
name: 'business'
},{
fieldLabel: 'Mobile',
name: 'mobile'
},{
fieldLabel: 'Fax',
name: 'fax'
}]
}]
}, }); tabs.render(document.body);
});
小弟想请教如何将文本框 eeeee 和 yyyyy设置成并列的而不是上下的。并且想问问怎么在里面添加下拉框。求大神指导,谢谢。
2012年12月29日 11点12分
1
以下是小弟自己试做的一个界面源码如下:
Ext.onReady(function() {
Ext.QuickTips.init();
var bd = Ext.getBody();
bd.createChild({tag: 'h2', html: '11111'}); var tabs = Ext.widget({
xtype: 'form',
id: 'tabForm',
bodyPadding: '5 5 0',
width: 600,
fieldDefaults: {
labelAlign: 'top',
msgTarget: 'side'
},
items: {
xtype:'tabpanel',
activeTab: 0,
defaults:{
bodyPadding: 10,
layout: 'anchor'
}, items:[{
title:'ceshi',
defaultType: 'textfield',
defaults: {
anchor: '100%'
},
items: [{
fieldLabel: '11',
name: 'first',
anchor:'45%',
},{
fieldLabel: 'eeeee',
name: 'last',
anchor:'45%',
},{
fieldLabel: 'yyyyyy',
name: 'company',
anchor:'45%',
},{
fieldLabel: 'aaaaa',
name: 'last',
anchor:'45%',
},{
fieldLabel: '33',
name: 'email',
anchor:'45%'
}]
},{
title: 'fujian',
defaultType: 'textfield',
defaults: {
anchor: '100%'
},
items: [{
fieldLabel: 'Home',
name: 'home',
},{
fieldLabel: 'Business',
name: 'business'
},{
fieldLabel: 'Mobile',
name: 'mobile'
},{
fieldLabel: 'Fax',
name: 'fax'
}]
}]
}, }); tabs.render(document.body);
});
小弟想请教如何将文本框 eeeee 和 yyyyy设置成并列的而不是上下的。并且想问问怎么在里面添加下拉框。求大神指导,谢谢。