Page 1 of 1

changeObjectLayer()

PostPosted: Tue Oct 11, 2016 8:43 pm
by Kataleena
Hi,

I want to use changeObjectLayer() on a object that has been set to automatic dragging by TB and used with a Definable drop target, is this possible? I tried changeObjectLayer() in the "Mouse over" "on click" of the object but its not working.

Thanks Kate

Re: changeObjectLayer()

PostPosted: Tue Oct 11, 2016 9:45 pm
by Clifton
Unfortunately, once you use ToolBook's automatic dragging, it takes over the layering of the object. You may be able to affect the layering if you set a little timed delay using pgTBObjSet() to send a trigger or user event after say 200ms. Then set the layer using changeObjectLayer() with the trigger or user event of the object. Problem is that this may not be what you are looking for.

May be better to use createDraggableObject() to dynamically make the object draggable. The function allows you to manipulate the layer before or after dragging.