PDA

View Full Version : Combobox trigger buttons cropped, layout problem?



philipp_sidarion
29 Apr 2010, 1:25 AM
Hi

I have the following problem using the column layout: This piece of code results in the page displayed below:


var vModifyHostPanel = new Ext.FormPanel({
title: 'Modify Host',
id: 'ModifyHostPanel',
tools: tools,
//collapsible:true,
draggable:true,
closeable: false,
bodyStyle:'padding:5px 5px 0',
layout:'form',
width: 280,
frame:true,
autoWidth : true,
items : [{
layout : 'column',
layoutConfig : {
columns : 3
},
items : [{
columnWidth : .6,
layout : 'form',
labelWidth : 120,
items : [
vHostNameFieldAutoCombo, //new Ext.form.ComboBox
vNewHostNameField, //Ext.form.TextField
vForwardZonesListCombo, //new Ext.form.ComboBox
vForwardZonesListComboForSelection, //new Ext.form.ComboBox
vIPHostAddressFieldAutoCombo, //new Ext.form.ComboBox
vAliasesTextField, //Ext.form.TextField
vLocationTextField, //Ext.form.TextField
vCommentTextField, //Ext.form.TextField
vMACHostAddressFieldAutoCombo ////new Ext.form.ComboBox
],
buttons:
[{
text: 'Modify',
tooltip: 'Modify host',
handler: function() {
//Some code....
} //end handler
}, {
text: 'Delete',
tooltip: 'Delete this host',
handler: function()
{
//Some code....
} //end handler
}, {
text: 'Get this host data',
tooltip: 'Get this host data',
handler: function()
{
//Some code....
} //end handler
}, {
text: 'Clear',
tooltip: 'Clear all fields to default values',
handler: function() {
//Some code....
}
}]
}, {
columnWidth : .1,
layout : 'form',
labelWidth : 120,
items : [{
html:'    '
}],
},{
columnWidth : .3,
layout : 'form',
labelWidth : 120,
items : [{
html:'Add here some text to explain the functionality...'
}],
}]
}]
});


20222

The trigger buttons are cropped... When I click the first time on a button, then everything looks nice... Can anybody help me how to avoid this display-problem when the page is loaded the first time?
Thanks a lot for your support! Regards
Philipp

Animal
29 Apr 2010, 1:50 AM
Why this extra layer of containment? Why NEST a column layout Panel within your FormPanel?????? I don't understand what drives you to do it. And it's unsized too, so how much width should it allocate?

philipp_sidarion
29 Apr 2010, 2:36 AM
Why this extra layer of containment? Why NEST a column layout Panel within your FormPanel?????? I don't understand what drives you to do it. And it's unsized too, so how much width should it allocate?

Hello

Well, I'm open for every simplification :-)... What I need in the end is that there are two or three colums in my form, the first containing all the formular fields and the buttons, the second used as a "space" column, and the third containing some text... Can you give me a hint how to simplify the code? And regarding the unsized, well, it should span over the whole page (as it does), do I need to set another parameter?
Thanks a lot for your help!
Philipp