Drag GoButton from palette


#1

Hi

Is it possible to have a GoButton on a GoPalette and to drag it to a GoView? Same as is normally done with a GoNode.

Thanks!


#2

The Click action for the button is going to conflict with it being dragged.

you can create the button in the palette with:

button.ActionEnabled = false;

and then you will be able to drag it. But you will have to handle the ExternalObjectsDropped event in the GoView and enable it. (See the Processor sample for a sample of ExternalObjectsDropped)

ah… another way, I believe this works too: remove the GoToolAction from the palette.

goPalette1.ReplaceMouseTool(typeof(GoToolAction), null);


#3

Are you trying to build a User Interface layout tool? I’ve got a small unpublished sample around here somewhere that does a little of that.