내가이 레이아웃을 가지고 메신저 일부 데이터를 설정하면 동적으로 레이아웃의 크기를 조정하지 않고 최종 결과처럼이extjs hbox 레이아웃에 자동 높이를 설정하는 방법은 무엇입니까?
이
win = Ext.create('widget.window', {
title: 'Layout Window',
closable: true,
closeAction: 'hide',
width: 750,
height: 500,
layout: 'fit',
animCollapse: true,
bodyPadding: 5,
items: [{
xtype: 'container',
layout: 'hbox',
align: 'stretch',
items: [{
xtype: 'fieldset',
flex:1,
title: 'Details',
margins:'0 5 0 0',
layout: 'anchor',
autoHeight: true,
items: [{
xtype: 'displayfield',
fieldLabel: 'Name',
name: 'customer_name',
id: 'customer_name',
width: 300
},{
xtype: 'displayfield',
fieldLabel: 'ID Card',
id: 'customer_id',
name: 'customer_id',
width: 300
},{
xtype: 'displayfield',
fieldLabel: 'Address',
name: 'address',
id: 'address',
width: 300
}]
},{
xtype: 'fieldset',
title: 'Details',
margins:'0 0 5 0',
flex:1,
layout: 'anchor',
autoHeight: true,
items: [{
xtype: 'textfield',
labelWidth: 120,
fieldLabel: 'invoice',
anchor: '98%',
name: 'invoice_number',
id: 'invoice_number',
allowBlank: false,
readOnly: true
},{
xtype: 'textfield',
labelWidth: 120,
fieldLabel: 'Payment Amount',
anchor: '98%',
name: 'payment_amount',
id: 'payment_amount',
allowBlank: false
},{
xtype: 'button',
id: 'test'
}]
}]
}]
}).show();
이, 나는 단지를 사용하여 코드 메신저입니다 필드를 테스트 용으로 표시하기위한 데이터 설정에 사용
Ext.getCmp('test').on('click', function(){
Ext.getCmp('customer_name').setValue('customer name customer_name customer_name customer_name');
Ext.getCmp('customer_id').setValue('855');
Ext.getCmp('address').setValue('some text, some text, some text, some text');
});
이 문제를 해결하는 방법은 무엇입니까? 당신이 디스플레이 필드 셋의 내용을 설정 한 후
오른쪽 :
감사합니다 모든
사실 ExtJS4의 고통 중 하나입니다. 이벤트를 크기를 조정하지 않고 그것을 달성하는 방법을 찾아내는 데 관심이 있습니다. :) –