Changing the clickable area of a node?

I am trying to extend the clickable area of a node class derived from GoBasicNode.
I would have expected the clickable area to be the bounds rectangle, but is seems to be only the bounds rectangle of the shape inside the basic node.
How can I dynamically change the clickable area of the node ?
Regards
snielsson

Well, in the next release this is easy to specify: just set GoGroup.PickableBackground to true. For the current or older releases, you can add the following override in your node class:
public override GoObject Pick(PointF p, bool selectableOnly) {
// quick bounds check
if (!this.Bounds.Contains§)
return null;
if (!CanView())
return null;
foreach (GoObject obj in this.Backwards) { // must go opposite direction from Paint
GoObject picked = obj.Pick(p, selectableOnly);
if (picked != null)
return picked;
}
// when the point is not in any of the group’s child objects:
if (!selectableOnly)
return this;
if (CanSelect())
return this;
GoObject obj = this.Parent;
while (obj != null) {
if (obj.CanSelect())
return obj;
obj = obj.Parent;
}
return null;
}
FYI, the PickableBackground property currently exists in the GoSubGraph class; in the next release we’re promoting it to the GoGroup class.

Thanks a lot for the answer, it is very useful and my stuff is working now.
I have noticed that the Pick method is called when I just moved the mouse pointe into the view area, even though it is not hovering over a node.
This leads me to the conclusion that the Pick method is called for every GoObject in a diagram on every mosue event - also the move events. I would have expected the Pick method only to get called on mouse click event - why is that not the case ?
Would it give noticable performance enhancements if pick only was called for mouse click events, or does it not matter in practice?
How can you change the when the pick metohd is called ?
Anyway, it seems like you have to keep your cick override methods very tight and small.
regards
snielsson

Picking is indeed done very often–GoView.DoMouseOver calls GoView.PickObject to find any object that needs a tooltip or a cursor or other custom behavior implemented by a GoObject.OnMouseOver override. After all, how can it hover over an object unless it knows there is an object there to hover over?
Picking is different from selecting. Picking is also known as “hit testing”–to find an object at a given point. Selecting is adding an object to the GoView.Selection collection. But of course selecting depends on picking to choose the object to be selected.
There are some optimizations that may cause Pick not to be called on objects that are known to be far away. If you are worried about interactive performance you can try overriding GoView.DoMouseOver to be a no-op, or just to call GoView.DetectHover if you still want to get ObjectHover and BackgroundHover events. But I think you’re the first person to express such a concern.