ldb68 Posted May 28, 2012 Share Posted May 28, 2012 Is there a way to move memo and images (in web mode) on a form at run time by click down the mouse on the object? I need to make a simple pubblisher editor (need to insert text box and images) with the ability to place these objects on the page. thanks Quote Link to comment Share on other sites More sharing options...
ldb68 Posted June 29, 2012 Author Share Posted June 29, 2012 No way to do the request? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 29, 2012 Administrators Share Posted June 29, 2012 You want to "move" the object? In what manner? Quote Link to comment Share on other sites More sharing options...
ldb68 Posted July 3, 2012 Author Share Posted July 3, 2012 I want to add memos and images on the screen. Clicking down the mouse on them I would place them freely on the screen (like a windows). Something like this: http://www.switchonthecode.com/tutorials/javascript-draggable-elements thanks You want to "move" the object? In what manner? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 25, 2012 Administrators Share Posted July 25, 2012 ExtJS supports drag and drop through Ext.dd.DragDrop component. I haven't analyzed it but there are several examples under examples folder. 1 Quote Link to comment Share on other sites More sharing options...
dima72 Posted August 5, 2012 Share Posted August 5, 2012 > there are several examples under examples folder which ones exactly, please. I skimmed through all Demos directory with %DragDrop% search and did not find anything. thanks in advance, Dmitry 1 Quote Link to comment Share on other sites More sharing options...
dima72 Posted August 6, 2012 Share Posted August 6, 2012 Hi idb68, try this: 1.Put on on Form a TUniPanel 2.In form's ClientEvents->ExtEvents->OnMouseMove write this code function window.Onmouseup(sender, x, y) { ajaxRequest(sender, 'MyEvent', [ 'param0='+x, 'param1='+y ]); } 3.On form OnAjaxEvent implement something like this procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TStrings); var X,Y: Integer; begin if EventName='MyEvent' then begin TryStrToInt(Params.Values['param0'], X); TryStrToInt(Params.Values['param1'], Y); UniPanel1.Left:= X-(UniPanel1.Width div 2); UniPanel1.Top:= Y-(UniPanel1.Height div 2); end; end; Please do not criticize me for this code as it is rather experimental. dima 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.