Need a drag for canvase in groupbox

I place a canvas in groupbox, and place a checkbox in canvas.
I want to make a “drag” into “checkbox” but notihng happens.

I try delete groupbox,thus I can bring “canvas” zindex to the top of “checkbox”,and drag ok.

Is there a way let me manual set the zindex for checkbox sets and canvas in the “groupbox”?

thanks in adavance

In the CheckBox’s Open event, did you add the Accept code ?
Did you add the DropObject Event filled with code ?

accepttextdrop? I didn’t want to drop anything to checkbox.but just drag checkbox

Chai, I read several times your OP, but it is so unclear…

You can indeed drag a canvas, and if the checkbox is child of that canvas, it will be dragged in the process. Since you mention a groupbox, I assume it is a Desktop project. It would be nice to post in macOS, Windows or Linux to make that more evident.

To make a canvas draggable, you need to store the click position relative to the canvas in MouseDown, then move the canvas, relative to the mouse position in mouseMove, if the mouse button is down.

Can you clarify what you think ?

The drop text could be True or False …

I do not understand ? Certainly, but what must I understand ? ;-:slight_smile: