bilcan Posted January 15, 2017 Posted January 15, 2017 I put a unipanel on form and set draggable property true then I changed onEndDrag event as above. But Panel's position not changed after the drag. procedure TMainForm.UniPanel1EndDrag(Sender: TUniControl; Left, Top: Integer); begin UniPanel1.Left := 200; UniPanel1.Top := 200; end; 1 Quote
Sherzod Posted January 16, 2017 Posted January 16, 2017 Hi, For now try this...: procedure TMainForm.UniPanel1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var _left, _top: Integer; begin if EventName = 'setLT' then begin _left := StrToInt(Params.Values['left']); _top := StrToInt(Params.Values['top']); with (Sender as TUniControl) do begin Left := _left; Top := _top; end; end; end; procedure TMainForm.UniPanel1EndDrag(Sender: TUniControl; Left, Top: Integer); begin Sender.Left := Left; Sender.Top := Top; //Sender.Left := 200; //Sender.Top := 200; Sender.JSInterface.JSCode('var me='#1'; Ext.defer(function(){'+ 'me.setPosition(200,200); '+ 'ajaxRequest(me, "setLT", ["left=200", "top=200"])}, 20);'); end; Best regards. Quote
bilcan Posted January 16, 2017 Author Posted January 16, 2017 Hi, I think this is a bug and will be fixed? will you? 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.