Jump to content

run time moving object on form


Recommended Posts

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.



Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...
  • 2 weeks later...

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);


X,Y: Integer;


if EventName='MyEvent' then


TryStrToInt(Params.Values['param0'], X);

TryStrToInt(Params.Values['param1'], Y);

UniPanel1.Left:= X-(UniPanel1.Width div 2);

UniPanel1.Top:= Y-(UniPanel1.Height div 2);




Please do not criticize me for this code as it is rather experimental.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...