View Issue Details

IDProjectCategoryView StatusLast Update
0005606JEDI VCL00 JVCL Componentspublic2012-06-12 10:51
ReportertetarddAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionsuspended 
Product Version3.40 
Target VersionFixed in Version 
Summary0005606: TJvDragDrop does not work inside frame
DescriptionIf the TJvDragDrop is inside a frame, it does not work.
Additional InformationSee 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.
TagsNo tags attached.

Activities

2011-06-25 12:09

 

Bug JvDragDrop.zip (574,643 bytes)

tetardd

2011-06-25 12:15

reporter   ~0018805

Similarly, TJvDropTarget does not work either when in a frame.

tetardd

2011-06-30 13:56

reporter   ~0018809

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.

obones

2011-09-21 14:13

administrator   ~0018953

Thanks, we'll wait for your changes then

obones

2012-02-23 11:21

administrator   ~0019506

Any news?

obones

2012-06-12 10:51

administrator   ~0019897

No news, I'm suspending the issue

Issue History

Date Modified Username Field Change
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