TheNakedPirate
23 Aug 2007, 10:33 PM
I am try to use a layout dialog from a toolbar button on a tabpanel
(pretty much a cut and paste from the example)
My problem appears to be that the whole form is modal not just the bits that aren't the layout dialog. (the example works fine) is there something different with toolbar buttons over regular buttons that might have an effect on this dialog
myTabPanel.tableToolbar.addButton(
{
text: 'Add', cls: 'x-btn-text-icon add-opt', handler: function(o, e)
{
var myPanel = new Ext.LayoutDialog("myelement-dlg", {
animateTarget: 'myelement',
modal:true,
draggable: false,
width:400,
height:300,
shadow:true,
minWidth:300,
minHeight:300,
center: {
autoScroll:true,
tabPosition: 'top',
closeOnTab: true,
alwaysShowTabs: true
}
});
myPanel.addKeyListener(27, myPanel.hide, myPanel);
myPanel.addButton('Submit', myPanel.hide, myPanel);
myPanel.addButton('Close', myPanel.hide, myPanel);
var myPanelLayout = myPanel.getLayout();
myPanelLayout.beginUpdate();
myPanelLayout.add('center', new Ext.ContentPanel('center'));
myPanelLayout.endUpdate();
myPanel.show();
}, scope: myTabPanel
});
(pretty much a cut and paste from the example)
My problem appears to be that the whole form is modal not just the bits that aren't the layout dialog. (the example works fine) is there something different with toolbar buttons over regular buttons that might have an effect on this dialog
myTabPanel.tableToolbar.addButton(
{
text: 'Add', cls: 'x-btn-text-icon add-opt', handler: function(o, e)
{
var myPanel = new Ext.LayoutDialog("myelement-dlg", {
animateTarget: 'myelement',
modal:true,
draggable: false,
width:400,
height:300,
shadow:true,
minWidth:300,
minHeight:300,
center: {
autoScroll:true,
tabPosition: 'top',
closeOnTab: true,
alwaysShowTabs: true
}
});
myPanel.addKeyListener(27, myPanel.hide, myPanel);
myPanel.addButton('Submit', myPanel.hide, myPanel);
myPanel.addButton('Close', myPanel.hide, myPanel);
var myPanelLayout = myPanel.getLayout();
myPanelLayout.beginUpdate();
myPanelLayout.add('center', new Ext.ContentPanel('center'));
myPanelLayout.endUpdate();
myPanel.show();
}, scope: myTabPanel
});