Strange "DragOver" behaviour

Ok… first … I cannot duplicate this issue in a sample project (yet)…
But here is what is happening…

I have a window.
That window contains a TABPANEL (full size of the window, almost)
The first pane of the Tabpanel contains a 3 group boxes left to right (the group boxes for the most part are for visual effect)
The first group box contains a Listbox
The Second contains a Canvas
The third contains a couple of popup menus

The canvas is set to accept TEXTDROP

The idea is to select some “text” from the listbox, drag it to the canvas, and when dropped it creates a “shape”
That works just fine… EXCEPT for this minor issue

DRAGOVER, and DROPOBJECT do not fire unless my mouse is 528 or more pixels inside the canvas!

There are NO controls on top of the canvas…

Now when items are dropped… they do need to be inside a specific rectangle that is centered in the canvas.
But I doubt that is the cause , for two reasons

  1. the 528 px barrier is well inside the “rectangle drop area”
  2. I don’t validate the drop area specifics until DROPOBJECT happens…

As mentioned above… even DRAGOVER doesn’t fire.

Has anyone else run across something strange as this?

I am wondering is there is an issue with drag/drop if the source or destination is in tabpanels and/or groupboxes???

It looks like the problem was either the TabPanel… or (I forgot to mention) there was a PLACARD under all it (why? I have no idea :slight_smile: )

But as a test I removed the TabPanel (which is when I discovered the Placard and removed it to)… put the Groupboxes with the Listbox and Canvas back it place and now DragOver fires at pixel 0 not 528

I’d wager that the framework code is offsetting the x/y based on the parent, when it doesn’t have to. Parented controls are still relative to the window.

That was my first thought as well… but the canvas’s parent (the groupbox), and the groupbox parent (the tabpanel) were no where near 528 px from the edge of anything …

As mentioned above … removing both the placard and tabpanel caused the issue to go away… tommorow I will see if I can get away with just removing the placard… as the tabpanel is kinda integral to the desired workflow.

Perhaps the placard was the control set up to accept the drag events?

No… the canvas was the only control with an ACCEPTDROP option activated… I don’t even remember why the placard was even there… There were no events attached to it.

However it WAS the placard causing the issue. I removed it, leaving the Tabpanel and the rest of the controls exactly as they were, and the DRAG events now fire when they should.

Also I know recall WHY I put the placard there…

I have a custom toolbar, and used some declares to set the window background… but that made the body of the underlying window a much darker color… so the placard was supposed to be a cheap fix

Not sure why I didn’t just use the Windows own PAINT event… which I just added, and seems to work just fine. :slight_smile: