PDA

View Full Version : How LayoutDialog works?



ricardoss
21 Jun 2007, 12:43 PM
HTML:

<body......

<div id="hello-dlg">
<div id="centro"></div>
<div id="centro2"></div>
</div>

<div id="painel">
<div id="componentes"></div>
<div id="diagrama"></div>
</div>

</body>

========================================================
JavaScript:

var showBtn = Ext.get(showBotao);

var dialog = new Ext.LayoutDialog("hello-dlg", {
modal:true,
width:600,
height:400,
shadow:true,
minWidth:300,
autoCreate: false,
minHeight:300,
proxyDrag: true,
west: {
split:true,
initialSize: 150,
minSize: 100,
maxSize: 250,
titlebar: true,
collapsible: true,
animate: true
},
center: {
autoScroll:true,
tabPosition: 'top',
closeOnTab: true,
alwaysShowTabs: false
}
});

dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Submit', dialog.hide, dialog);
dialog.addButton('Close', dialog.hide, dialog);

var layout = dialog.getLayout();
layout.beginUpdate();
layout.add('center', new Ext.ContentPanel('centro', {title: 'The First Tab'}));
layout.add('west', new Ext.ContentPanel('centro2', {title: 'West'}));
layout.endUpdate();

dialog.show(showBotao.dom);
};
===========================

When I click on button, I want to show a LayoutDialog using div id="hello-dlg". But the div id="painel" appears in the LayoutDialog too. The div id="painel" I was already using in the background page.

Could anyone help me?:D

thanks!

ricardoss
22 Jun 2007, 8:54 AM
I got it:

Must exists any text between the <div> like that:

<div id="hello-dlg">
<div id="centro">xxxxxxxxxxxxxxxx</div>
<div id="centro2">xxxxxxxxxxxxxx</div>
</div>

Is not a bug?