View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005606||JEDI VCL||00 JVCL Components||public||2011-06-25 12:09||2012-06-12 10:51|
|Target Version||Fixed in Version|
|Summary||0005606: TJvDragDrop does not work inside frame|
|Description||If the TJvDragDrop is inside a frame, it does not work.|
|Additional Information||See attached demo.|
I have 2 panels, 1 with a TJvScrollBox and a TJvDragDrop, the other one with a Frame containing a TJvScrollBox and a TJvDragDrop. The two TJvDragDrop are configured exactly the same.
Run the app, drag a file onto the two scroll boxes. The one that's directly set in the panel in the parent form will accept the dragged file. The one that is in the frame will not.
|Tags||No tags attached.|
Bug JvDragDrop.zip (574,643 bytes)
||Similarly, TJvDropTarget does not work either when in a frame.|
OK, I've done a bit of testing and this is what I think is happening:
When a frame is dynamically created, the controls inside it are recreated (i.e. their handle change) when you set the frame's parent property. If you have registered a control (using the current control's handle) as a drop target in the frame's OnCreate (where else can you do logically that?), once the frame has been recreated and shown, that registered handle is not longer valid and the new control's handle not registered.
I think it might be necessary in the TJvDropTarget control to override the SetParent methods and unregister the previous (now obsolete) handle and register the new handle.
I'll try to make these changes and see if they work and post an updated TJvDropTarget control.
||Thanks, we'll wait for your changes then|
||No news, I'm suspending the issue|
|2011-06-25 12:09||tetardd||New Issue|
|2011-06-25 12:09||tetardd||File Added: Bug JvDragDrop.zip|
|2011-06-25 12:15||tetardd||Note Added: 0018805|
|2011-06-30 13:56||tetardd||Note Added: 0018809|
|2011-09-21 14:13||obones||Note Added: 0018953|
|2011-09-21 14:13||obones||Status||new => acknowledged|
|2012-02-23 11:21||obones||Note Added: 0019506|
|2012-06-12 10:51||obones||Note Added: 0019897|
|2012-06-12 10:51||obones||Status||acknowledged => resolved|
|2012-06-12 10:51||obones||Resolution||open => suspended|
|2012-06-12 10:51||obones||Assigned To||=> obones|