Determine if GoObject is on Palette

I have a number of classes which wrap GoComment/GoGeneralNode/etc and in each case I override OnContextClick to add some custom command/control menu items.

I add the items to a GoPalette and allow the user to drag/drop them onto a document… I only want to show the right click menu when they exist on the document and NOT when they are on the Palette. Is there a simple way to know (when the OnContextClick is triggered) whether the goObject exists on the palette or the document?

OnContextClick hands in the view… so you should be able to:

if (view is GoPalette) return false;

Great! Thanks so much for the help.