MouseDrag Not Firing

Hi All, I’m encountering this problem while using the MouseDrag event with a ContainerControl.

I red many older threads about people complaining of Mouse Events not firing due to a Xojo Bug so the only thing I can do is to ask you for the reason why it doesn’t work.

Xojo 2020 Release 2.

The answer is there:

https://documentation.xojo.com/MouseDrag_event

ContainerControl is not in the list.

If so why Xojo gives this option in the contextual menu of the ContainerControl ?

It’s a new type of bug? Let’s call it scam.

What a waste of time!

Do you return true in the MouseDown event? If I do this, I get the MouseDrag event.
mousedrag.xojo_xml_project

1 Like

Thank you Tim, it seems we got problems about the official documentation. I red about the return true method while reading the complaints but not that it must be implemented into the MouseDown event.

However it does not explain why the rules exclude the ContainerControl if it works. Or even it does not explain why the ContainerControl allows the implementation of the MouseDrag event if the documentation says it can’t.

I red it too @Emile_Schwarz but seems there’s confusion about.

I know this is an older thread, marked as solved, but having a DragItem involved seems to complicate things. Tim, your example works as advertised, but if I simply add the code from the “Drag to Desktop” example, MouseDrag no longer fires (but the drag works.) For that matter, neither does DragExit (which I really care about), which actually takes a DragItem as a parameter.

Maybe I’m doing something wrong, but I don’t see the point of drag handlers that don’t work when you’re handling “something.” :slight_smile:
mousedrag_with_dragitem.xojo_xml_project.zip (5.2 KB)

Future Jerry: I had to remind myself that Xojo only just fixed drag-to-desktop, so this was a non issue at the time of the thread. So unless I’m doing something wrong here, I see a ticket in my future (and starting a new thread.) :slight_smile:

I never use the Container Control.

The Canvas.MouseDown Event documentation (Deprecated Canvas) and DesktopCanvas
There is a difference.

You wanted to drag a Container ?

Emile, I reawakened a four year old thread here. Perhaps I should not have. Tim was helping the OP, and his example worked. My point, that I thought relevant to the thread, was that I don’t seem to able to get “any” drag events to fire when I actually add a DragItem. When I added a simple one (Xojo’s drag to desktop example) to Tim’s code, I broke it. That’s more the point, than who was doing what with container controls—four years ago. :slight_smile:

Sorry.

1 Like