Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Thread Tools Display Modes
Old 08-11-2016, 03:38 AM
delphimpd delphimpd is offline
Senior Member
Join Date: Oct 2006
Posts: 701
Default Drag and Drop with Panel to follow

Thanks in advanced for the Help.

Hi everyone. It is been a while since I don't post anything in the forum due to other reasons.

I would like to see If I can get help in what I am trying to do.

I have two grids in which I have Implemented Drag an Drop, I have no problems with the drag and drop.

What I would like to do is the following based on the following scenario

1. I have a hidden Small Panel which carries the Name of the person whos been drag from on dbGrid to another dbGrid in a DBLabel inside the panel.

2. I need that when I select the row from the dbGrid and start dragging it, the panel will unhide but will follow the mouse cursor all the way until the record is dropped in the other grid.

I would like to accomplish this so that the user knows exactly who is been dragging and dropping.

Thank you so much for the hel.

Best regards,
Reply With Quote
Old 08-11-2016, 08:24 AM
Norrit Norrit is offline
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,335

My best guess would be to create a borderless form when dragging starts. Just place it at the cursor position and make it move with the mouse movement. When dragging stops you can free the form.
Just add a label on that form and instead of detacching your panel with label just copy the text of the panel.label to the new form.label

You can do the same with the panel.visible, but you can have issues with the components display order and refresh of the form itself (panel.BringToFront() and perhaps some repaints/invalidates/processmessages).
Therefor my suggestion for the new form, should be easier.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT. The time now is 04:33 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.