bilcan Posted January 15, 2017 Share 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 Link to comment Share on other sites More sharing options...
Sherzod Posted January 16, 2017 Share 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. Link to comment Share on other sites More sharing options...
bilcan Posted January 16, 2017 Author Share Posted January 16, 2017 Hi, I think this is a bug and will be fixed? will you? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now