How can I arrange some images in a panel with 'hbox' layout and in the same time, keep them aligned with the other fields in the form ?
Common form fields in ExtJs have a margin-bottom
of 5px
and a height
of 22px
, so the only way I can think right now is to put the image considering this field defaults. The problem comes when i have multiple lines in my panel, in Internet Explorer especially.
Basically, I want my form to look like this:
What I tried so far (first I created the image directly, not as an item in a container --> the same result):
createImageItem: function(config)
{
return Ext.create('Ext.container.Container', { width: 16, height: 22,
items: [{ xtype: 'image', padding: 3, src: 'resources/images/arrowLeft.png'}],
margin: '0 5 5 5'
});
}
In Chrome looks fine, but in IE the images go up with 1px
every row. I don't know why.
Is there any other way to do this? I would be perfect to be a nicer way and don't bother about the pixels and calculations.
Thank you!
I am using ExtJs version 4.0.7