Hi
Okay let me illustrate with an example.
Code:
Ext.onReady( function() {
var panel = new Ext.Panel({
id:'main-layout'
,layout:'table'
,layoutConfig:{columns: 3}
,defaults:{border: false}
,items:[
{
id: '1'
,html: 'Title: '
},{
id: '1a'
,html: ''
},{
id: '1b'
,items: {
xtype: 'textfield'
,name: 'testField'
,msgTarget: 'under'
}
},{
id: '2'
,html: ''
},{
id: '2a'
,items: {
xtype: 'button'
,icon: 'images/red_minus.png'
,text: ''
,handler: function () {
// Do something here.
}
}
},{
id: '2b'
,items: {
xtype: 'datefield',
format: 'Y-m-d',
msgTarget: 'under'
}
}
]
});
panel.render(Ext.getBody());
In this example I have an "html" (or plain text" label, followed by an action button and then the field. (PLS note that TriggerField and TwinTriggerField are not options for me to replace this layout at the moment... we can discuss later if need be.)
So using the table layout I have everything left aligned 'out of the box'. If I want to change that alignment, adding some css works nicely on the html field label but does nothing to the button or field itself. Trying to use ctCls also shows no change.
What did work for me (when aligning the button as I can live with left aligned fields) was modifying the button config to the following (As per a previous post you made Animal).
Code:
id: '2a'
,bodyCfg: {
tag: 'center'
}
,items: {
xtype: 'button'
,icon: 'images/red_minus.png'
,text: ''
,handler: function () {
// Do something here.
}
}
In the examples posted above by Animal; hbox, vbox, table layout, container layout etc (I'm confident that) those are clear to me when to use them.. what's not clear is when I want to ADD style to the items IN those layouts.
Here is hoping I'm a bit clearer in my explanations sorry for the initial confusion.
Thanks for the patience.