Selection Handles

Hi,
I would like have resize handles on you node, even when Resize is not set to true. Right now, if you set resize to false, you get the bouding box instead of the resize handles. I know I can override OnGotSelection(), but I don’t quite know how to proceed from there.
Have you guys got any recommendations?
Thanks, Bennie

Sure, although you want to override GoObject.AddSelectionHandles. You can do something like what the LinearGradientRoundedRectangle class does, which is used as the Icon of the ColoredNode class, or could be used as the Shape of a GoBasicNode.
[Serializable]
public class LinearGradientRoundedRectangle : GoRoundedRectangle {
public LinearGradientRoundedRectangle() {}
public override void AddSelectionHandles(GoSelection sel, GoObject selectedObj) {
RemoveSelectionHandles(sel); // get rid of any existing handles
base.AddSelectionHandles(sel, selectedObj); // do normal behavior
if (!CanResize()) {
RectangleF rect = this.Bounds;
float x1 = rect.X;
float x2 = rect.X + (rect.Width/2);
float x3 = rect.X + rect.Width;
float y1 = rect.Y;
float y2 = rect.Y + (rect.Height/2);
float y3 = rect.Y + rect.Height;
// create the eight handles that are filled but do not resize
sel.CreateResizeHandle(this, selectedObj, new PointF(x1, y1), NoHandle, true);
sel.CreateResizeHandle(this, selectedObj, new PointF(x3, y1), NoHandle, true);
sel.CreateResizeHandle(this, selectedObj, new PointF(x3, y3), NoHandle, true);
sel.CreateResizeHandle(this, selectedObj, new PointF(x1, y3), NoHandle, true);
sel.CreateResizeHandle(this, selectedObj, new PointF(x2, y1), NoHandle, true);
sel.CreateResizeHandle(this, selectedObj, new PointF(x3, y2), NoHandle, true);
sel.CreateResizeHandle(this, selectedObj, new PointF(x2, y3), NoHandle, true);
sel.CreateResizeHandle(this, selectedObj, new PointF(x1, y2), NoHandle, true);
}
}
. . .
}