Hello,
I have a HStack, which on record from a menu can be droped to add Button to that HStack, that's allow me to add some nice preference navigation to our application .
By doing that like it :
That work perfectly, now i would like to allow the user to remove button by droping them outside from the HStack, is there a way ?
Thx by advance
I have a HStack, which on record from a menu can be droped to add Button to that HStack, that's allow me to add some nice preference navigation to our application .
By doing that like it :
Code:
isc.defineClass("PersonalToolBar","HStack").addProperties({ border : "1px solid black", height : 20, membersMargin: 2, canAcceptDrop: true, dragAction : "move", drop : function () { var dragTarget =isc.EventHandler.getDragTarget(); var dragData = dragTarget.getDragData(); if(dragTarget && dragData) { for(var i = 0;i<dragData.length;i++) { this.addMember( isc.Button.create({ title : dragData[0].name, click : "changeListType('"+dragData[0].value+"')", autoFit : true, height : 18, canDragReposition:true, canDrop:true, dragAppearance:"target" }) ); } } else this.Super("drop", arguments); } }) isc.PersonalToolBar.create({ ID: "personalToolBar" })
Thx by advance
Comment