PDA

View Full Version : Why Ext.BoxComponent don't work?



edwardking
6 Aug 2010, 1:26 AM
I use following ext3.2 code,but I don't see the background picture,where is wrong about my code? Thanks


<link href="ext/resources/css/ext-all.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-all.js"></script>
<script type="text/javascript">
var myImage = new Ext.BoxComponent({
autoEl: {
tag: 'img',
src: '/images/test.jpg'
}
});
myImage.show();
</script>
<body>
<div>OK</div>
</body>

Condor
6 Aug 2010, 1:32 AM
No, you need to render(Ext.getBody()) the component.

(only Ext.Window auto-renders when showing it)