PDA

View Full Version : FileUploadField:button problem in TableLayout



Deeeem
29 Jun 2010, 4:13 AM
Hello, i've a problem with the align of the button in a FileUploadField, an half of the button is invisible:
21170



How i can fix it?

/* THE FILEUPLOAD FIELD */
var inserzioneAutomaticaArchiForm = new Ext.ux.form.FileUploadField({
buttonOnly : true,
listeners : {
'fileselected' : function(fb, v) {
console.log(fb);
console.log(v);
}
}
});

/* THE TABLE IN THE BIG AREA OF THE PAGE */
var inserzioneAutomaticaArchiNorth = {
region : 'north',
height : 500,
minSize : 170,
margins : '5 5 0 5',
split : true,

layout: 'table',
layoutConfig: {
columns: 4
},

defaults: {
bodyStyle:'padding:15px 20px'
},
items: [
{
html: '<p>Selezionare un file di testo csv, o un file Excel formattato come nel seguente esempio:</p>',
colspan: 4,
border: false
},

{
plain:true,
rowspan: 3,
border:true
},
{
border: true,
items: [inserzioneAutomaticaArchiForm] // THE BUTTON
}
]
};

var inserzioneAutomaticaArchi = {
id : 'inserzione-automatica-archi-panel',
title : 'Inserzione Automatizzata degli Archi',
layout : 'border',
items : [ inserzioneAutomaticaArchiNorth,
{
title : 'Risultato',
id : 'results2-panel',
region : 'center',
height : 150,
minSize : 75,
maxSize : 250,
margins : '5 5 2 5',
bodyStyle : 'padding:10px;',
autoScroll: true
}]
};


// the border layout:

var contentPanel = {
id : 'content-panel',
region : 'center', // this is what makes this panel into a region within the containing layout
layout : 'card',
margins : '2 5 5 0',
activeItem : 0,
border : false,
items : [
// from basic.js:
start, absolute, accordion, anchor, border, cardTabs,
cardWizard, column, fit, form, table, vbox, hbox,
// from custom.js:
rowLayout, centerLayout,
// from combination.js:
absoluteForm, tabsNestedLayouts,
// my panels
inserzioneManualeArchi, inserzioneAutomaticaArchi]
};


Thanks in advance

Animal
29 Jun 2010, 5:19 AM
I would avoid table layout .

Often what's needed is an anchor layout containing a series of hbox layout Containers.

Deeeem
29 Jun 2010, 5:26 AM
Thanks for the reply, i've actually solved with

{
plain:true,
rowspan: 1,
bodyStyle : 'padding:0 0 0 90px',
border:false,
items: [inserzioneAutomaticaArchiForm]
},
but i'm not satisfied about this solution.
I'll try to change layout from 'table' to anchor