Customer handle

hi

I have a question about Handle.

I made a BoundingHandle on my Drawing Object.
It is located directly in front of the upper right handle (size : 10 X 10)
I would like to use it as a button.
I implement the overring method ‘AddSelectionHandle’ and made a Boundinghandle.
The source code is shown below.

How to recognize recognize this handle when hovering mouse.
and how to use mouseDown Event at this moment and get this Handle.

I would like to operation resize handle.


public class MyDrawing : GoDrawing
{
public override void AddSelectionHandles(GoSelection sel, GoObject selectedObj)
{
base.RemoveSelectionHandles(sel);
base.AddSelectionHandles(sel, selectedObj);

        GoShape selectedShape = selectedObj as GoShape; 
        IGoHandle handle = sel.CreateBoundingHandle(this, selectedObj);
        GoShape shape = handle.GoObject as GoShape;           

        if (shape != null)
        {
            shape.Bounds = new RectangleF(selectedObj.Position.X + selectedObj.Width - 20, selectedObj.Position.Y - 5 , 10, 10);
            shape.BrushColor = Color.Red;
            shape.PenColor = Color.Black;
            shape.PenWidth = 1;
        }
    }

}


please some advices or example code.

thanks.

Handles already know how to be resize handles, so I’m not understanding what your goal is here.

Handles are added to the GoView, not the GoDocument. so, they aren’t going to be “seen” for mouseover / hover actions under the default tool input handlers.