erich.wanker Posted February 10, 2016 Posted February 10, 2016 Hello i want to create at runtime different uniPanels... Att runtime - i add in ClientEvents / ExtEvents : function afterrender(sender, eOpts) { sender.dd = new Ext.dd.DDProxy(sender, ''); sender.dd.afterDrag = (function (){sender.doLayout()}); Ext.onReady(function () { Ext.get(sender.id).select(".x-form-field").each(function (el) {sender.dd.addInvalidHandleId(el.dom.id)}) } ); } .. so i can drag and drop the panel in a UniForm .. 1.) Now i want to save the position of the unipanels for the next time (a array of uniPanels) - but when i read the position per delphiCode - the actual position of a moved-uniPanel is not read .. (it´s clear that a javascript should update the position to a delphi-variable .. but i dont know how) 2.) how can i prevent that a unipanel moved out of the UniForm.showmodal-Window? ( if left < 0 then left:=0) ThanX for suggestions Quote
Sherzod Posted February 10, 2016 Posted February 10, 2016 Hi Erich, Now, you can use: UniPanel1.Draggable.Enabled = [True] i.e.: 1. function afterrender(sender, eOpts) { //sender.dd = new Ext.dd.DDProxy(sender, ''); //sender.dd.afterDrag = (function (){sender.doLayout()}); Ext.onReady(function () { Ext.get(sender.id).select(".x-form-field").each(function (el) {sender.dd.addInvalidHandleId(el.dom.id)}) } ); } 2. UniPanel1.Draggable.Enabled = [True] Best regards. Quote
erich.wanker Posted February 10, 2016 Author Posted February 10, 2016 fuck ... GREAT !!!!!!!!!!! thanks .. thanks ... thanks ... perfect work !!!! :-) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.