drag a window into a tab

hello,
i have this code:

isc.Window.create({title:“Window0”, showShadow:false, autoDraw:false, ID:“Window0”})

isc.HLayout.create({
members:[
Window0
],
autoDraw:false,
ID:“HLayout2”

})

isc.HStack.create({
layoutLeftMargin:30,
members:[

    ],
    align:"left",
    left:40,
    autoDraw:false,
    width:"100%",
    ID:"HStack0",
    height:"100%",
	
ID:"HStackTab0"
})

isc.TabSet.create({
destroyPanes:“false”,
tabs:[
{
title:“Tab0”,
pane:HStackTab0,
ID:“Tab0”
},
{title:“Tab1”, ID:“Tab1”}
],
autoDraw:false,
ID:“TabSet0”
})

isc.HLayout.create({
members:[
TabSet0
],
autoDraw:false,
ID:“HLayoutsetTab”
})

isc.HLayout.create({
members:[
HLayout2,
HLayoutsetTab
],
autoDraw:true,
width:“100%”,
ID:“HLayout0”,
height:“100%”
})

it is possible to drag/drop the Window0 into Tab0?..
if yes, please explain me how.
thank you

i’ve found out how to do this…

i have another problem, how to arange the window to the position where i want, not in line.
i’ve tried with HLayout/HStack…but in this way the dropped window is aligned with the other.
the idea is that i want to put the window where i choose…
how to do this?

i’m looking forward for your answer

Use a Canvas as the drop target, that will allow absolute positioning.

i can’t succeed. it doesn’t want to drop down. pls tell me why??!.. instead of Canvas i used HLayout or HStack and it’s working.
but you told me to use Canvas as a drop target but it doesn’t want to drop the Window inside the Tab0.
i’m waiting for your answer.
thank you

isc.Window.create({title:“Window”, showShadow:false, autoDraw:false, ID:“Window0”,
dropComponents:true,
dragComponents:true,
canDrag: true,
canDrop: true,
dragAppearance: “tracker”,
canDropComponents: true,
canAcceptDrop: true,
top:200,
width: 100,
height:100
})

isc.HLayout.create({
members:[
Window0,

],
canDropComponents: true,
dragAppearance:"tracker",
canAcceptDrop: true,

ID:“HLayout2”
});

isc.Canvas.create({
layoutLeftMargin:30,
members:[

    ],
    align:"left",
    left:40,
    autoDraw:false,
    width:"400",
    ID:"HStack0",
    height:"100%",
dropComponents:true,
dragComponents:true,
canDrag: true,
canDrop: true,
canDragReposition: true,
canDragResize: true,
dragAppearance: "target",
canDropComponents: true,
canAcceptDrop: true,
ID:"CanvasTab0"

})

isc.TabSet.create({
destroyPanes:“false”,
tabs:[
{
title:“Tab0”,
pane:CanvasTab0,
ID:“Tab0”
}
],
autoDraw:false,
ID:“TabSet0”
})

isc.HLayout.create({
members:[
TabSet0
],
autoDraw:false,
ID:“HLayoutsetTab”
})

isc.HLayout.create({
members:[
HLayout2,
HLayoutsetTab
],
autoDraw:true,
width:“100%”,
ID:“HLayout0”,
height:“100%”
})

Setting canDropComponents:true, as you did below, is what makes a Layout accept a dropped component as a new Layout member. This property exists on Layout, not Canvas. For Canvas, if what you want is to make the dropped component a child, just implement drop to do that:

canAcceptDrop : true,
drop : function () {
   this.addChild(isc.EventHandler.dragTarget);
}