erich.wanker Posted October 22, 2014 Share Posted October 22, 2014 Hello :-) ... how can i read the uniForm position ? procedure TUniForm4.UniContainerPanel11Click(Sender: TObject); var x:Integer; begin showmessage(inttostr(uniForm4.Top)); ... is allways "0" ... and i think this is normal - because just client-side knows the actual position of a moveable form i think i must use Javascript like .. "UniSession.AddJS" or soemthing .. Can someone make a suggestion how to read the top-value of uniForm4 ? ThanX Erich Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 22, 2014 Share Posted October 22, 2014 how can i read the uniForm position ? ... is allways "0" ... and i think this is normal - because just client-side knows the actual position of a moveable form Hi Erich. At least, in version 0.97.0.1079 works fine. procedure TMainForm.UniButton2Click(Sender: TObject); begin ShowMessage(IntToStr(UniForm1.Top)); end; Best regards. Quote Link to comment Share on other sites More sharing options...
erich.wanker Posted October 22, 2014 Author Share Posted October 22, 2014 perfect :-) .. i got allways fast and professional answers from you - thanX .. short question: i have buyed licence 0.97.0.1074 ... how can i update this license? .. i only found the "trial" version to download. ThanX Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 22, 2014 Share Posted October 22, 2014 Link, where you downloaded the 0.97.0.1074... Quote Link to comment Share on other sites More sharing options...
erich.wanker Posted October 22, 2014 Author Share Posted October 22, 2014 Thanx for the Link ... everything worked fine after update .. Now - i use 0.97.0.1085 .. first of all i deinstalled components in delphi / removed FM-Software via windwos controll panel / delete programm-folder FMSoft .. .. the Delphi installation was fine - all components are working .. ObjectInspector / Servermodule / UniGUIVersion is showing: 0.97.0.1085 .. on Webserver - i cleared cache folder .. on Webserver - i copied ext-4.2.2.1144 -folder .. on Webserver - i copied uni-0.97.0.1085 -folder i recompiled uniGui-DLL .. but procedure TMainForm.UniButton1Click(Sender: TObject); begin ShowMessage(IntToStr(UniForm4.Top)); end; still brings "0" as result - also procedure TUniForm4.UniContainerPanel11Click(Sender: TObject); var x:Integer; begin showmessage(inttostr(UniForm4.Top)); any idea why ? ThanX Erich Quote Link to comment Share on other sites More sharing options...
erich.wanker Posted October 22, 2014 Author Share Posted October 22, 2014 ok .. i found the problem: if my UniForm is create - i use: function window.beforeshow(sender, eOpts) { sender.animate({ duration: 400, to: { y:100} }); } and i use for moving the uniForm: function window.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 your UNIGUI-Code thinks, the form is still on Top-position: 0 and my form-movement-methode also sends no event to your unigui-code . .. can i read the position of a UniForm (borderStyle = bsNone) with javascript ? Thanx Erich Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 22, 2014 Share Posted October 22, 2014 .. can i read the position of a UniForm (borderStyle = bsNone) with javascript ? Hi Erich. Try: //JS UniForm1.window.getY(); //Top UniForm1.window.getX(); //Left or rewrite: //sender.dd.afterDrag = (function (){sender.setPosition(sender.getX(), sender.getY())}); function window.afterrender(sender, eOpts) { sender.dd = new Ext.dd.DDProxy(sender, ''); sender.dd.afterDrag = (function (){sender.setPosition(sender.getX(), sender.getY())}); Ext.onReady(function () { Ext.get(sender.id).select(".x-form-field").each(function (el) {sender.dd.addInvalidHandleId(el.dom.id)}) } ); } now it should work! Best regards. Quote Link to comment Share on other sites More sharing options...
erich.wanker Posted October 23, 2014 Author Share Posted October 23, 2014 WOW ... THANK YOU !! ..works fine! :-) best greetings Erich Quote Link to comment Share on other sites More sharing options...
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.