Multiple selection

Hi ,

I am assesing feasiablity of GO Diagrams for my application. I have come across a problem.The steps to reproduce are:
1. I added more than 1 shapes(say 2 GoRectangle) on goview canvas.
2. Using Shift key and mouse left button combination, I select both the shapes.
3. Now I release shift key and click on empty space, both the objects get deselected. Perfect behaviour.
4. From Step 2, Keeping Shift key pressed if I click on empty space then nothing happens. I want to change this behavior to : all the selected objects to be deselected(in ths case 2 objects) if I click on empty space.
Thanks and Regards,
Vin

Try this:



// Powerpoint will keep existing selection if you shift-click on whitespace

// Visio doesn’t. GoDiagram uses PowerPoint style. This tool gives you the other option:

[Serializable]

public class VisioStyleSelectingTool : GoToolSelecting {

public VisioStyleSelectingTool(GoView v) : base(v) { }



public override void DoSelect(GoInputEventArgs evt) {



GoObject obj = this.View.PickObject(true, false, evt.DocPoint, true); // only selectable document objects

if (obj == null && evt.Shift) {

this.Selection.Clear();

}

else {

base.DoSelect(evt);

}

}

}



----------------------



Use this Tool via:



this.goView1.ReplaceMouseTool(typeof(GoToolSelecting), new VisioStyleSelectingTool(this.goView1));

Thanks jake. Problem solved.

Hi Jake,

Another issue:
1. Select any object.
2. Left Click on Empty Space.
3. Object gets deselected. Perfect Behaviour.
4. From Step1, Right Click on Empty space.
current Behaviour: Object gets deselected.
but I want the go view to do nothing. I mean right clicking on empty space, nothing should happpen(Right Click on objects, I have shown context menus).
Thanks and Regards,
Vin