70000936 Grip selections onadditem and onremoveitem events are not fire

Article 70000936
Type Bug
Product Engine
Version 7009
Date Added 11/17/2016
Fixed 7.7010.0.2 (11/17/2016)
Submitted by Sami Tainio

Summary

Grip selections onadditem and onremoveitem events are not fire

Solution

Fixed in version 7010.0.2

A new event vdDOcument.GripSelectionBeforeModify was added in order more easily control the grip selection modification

Example:

when an item is added to the grip selection it also set the HighLight true.
when it removed from the grip selection it set the HighLight false.
 doc.GripSelectionBeforeModify += new vdDocument.GripSelectionBeforeModifyEventHandler(doc_GripSelectionBeforeModify);
.....

// sender          The vdDocument object.
// layout           The active layout that the gripSelection is reference to.
// gripSelection  A collection representing the objects which the grips are drawn.
// item             The item that is going to be added or remove from the gripSelection
// bRemove      A boolean value representing if the item is going to be remove (true) or to be add (false)
// cancel          Set this as true in order to cancel the default VectorDraw event code.

 void doc_GripSelectionBeforeModify(object sender, vdLayout layout, vdSelection gripSelection, vdFigure item, bool bRemove, ref bool cancel)
        {
            item.HighLight = !bRemove;
            item.Invalidate();
        }

Send comments on this topic.