PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Schedule control as DnD Source
Schedule control as DnD Source
Iniciado por guest, 10,feb. 2016 08:27 - 3 respuestas
Publicado el 10,febrero 2016 - 08:27
Using WD20. I'm trying to set a Schedule Control as a programmed Drag and Drop source, but having no luck. In the 'End of Initialization' code for the Window I have

SCH_Test..DndSource = dndProgram
DnDEvent(Drag_Resource,SCH_Test,dndBeginDrag)

but the procedure Drag_Resource is never called when trying to drag.

I've also tried

SCH_Test..DndSource = dndProgram
DnDEvent("Drag_Resource",SCH_Test,dndBeginDrag)

Has anyone successfully got a Schedule Control working as a programmed Drag and Drop source?
Publicado el 10,febrero 2016 - 18:57
Hi

what do you mean by drag and drop.

I use the scedular control in my app. works just fin ? Drag and drop is a native behavior ? Or do you want to drag someting from an other app? I donoot know it that is possible. But drag and drop inside the control works just fine for me

regards
Publicado el 10,febrero 2016 - 20:07
If I remember correctly the beginDrag event start when you leave the schedule control. It is meant for dragging to/from another control. I use that to grab an appointment fromi a todo list (looper) and drop in onto the schedule. Or remove an appointment by dragging it from the schedule back to the looper.
Drag/drop an item within the schedule is handled by the schedulers own events like "moving an appointment" and so.
Publicado el 10,febrero 2016 - 22:28
Thanks Arie. I have it working now when dragging from an appointment to outside the control.

Unfortunately I want begindrag to fire when dragging a resource, so I'll have to simulate it with other events.

Thanks for pointing me in the right direction.

Rgds
Paul