PDA

View Full Version : panel does not work



sulfur
4 Apr 2011, 2:03 PM
hi all test


Ext.onReady(function () {
var parentPanel = new Ext.Panel({
title: 'Parent',

width: 500,
height: 300,
renderTo: 'canvas',
listeners: {
render: function (panel) {
var dropTarget = new Ext.dd.DropTarget(panel.body, {
ddGroup: 'myDDGroup',
notifyDrop: function (dragSource, e, dragData) {
alert(dragSource.id + ' dropped');
}
});
}
},
items: [{
id: 'child1',
xtype: 'panel',
title: 'Child Panel 1',
width: 500,
height: 80,
draggable: true
}, {
id: 'child2',
xtype: 'panel',
title: 'Child Panel 2',
width: 500,
height: 80,
draggable: true
}, {
id: 'child3',
xtype: 'panel',
title: 'Child Panel 3',
width: 500,
height: 80,
draggable: true
}]
});


new Ext.dd.DragSource(Ext.getCmp('child1').getEl(), {
ddGroup: 'myDDGroup'
});
new Ext.dd.DragSource(Ext.getCmp('child2').getEl(), {
ddGroup: 'myDDGroup'
});
new Ext.dd.DragSource(Ext.getCmp('child3').getEl(), {
ddGroup: 'myDDGroup'
});


});

sulfur
4 Apr 2011, 2:11 PM
Sorry was trying to figure out how to format code. How do I delete this thread? The Go Advanced button gives a 'PATHS' is undefined error.